changeset 377:d148403013c0

os_mem_fl.c: os_GetPartitionGroupHandle() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 09 Jun 2014 05:08:11 +0000
parents 754e72d134a0
children 3164604a6c70
files gsm-fw/gpf/osl/os_mem_fl.c
diffstat 1 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/gpf/osl/os_mem_fl.c	Mon Jun 09 04:53:32 2014 +0000
+++ b/gsm-fw/gpf/osl/os_mem_fl.c	Mon Jun 09 05:08:11 2014 +0000
@@ -72,7 +72,7 @@
 	UNSIGNED Allocated;
 	VOID *pStartAddress;
 	NU_TASK *First;
-	CHAR Name[8];
+	CHAR Name[NU_MAX_NAME];
 
 	if (os_GetPartitionPoolEntry(Handle, &pool) == OS_ERROR)
 		return(OS_ERROR);
@@ -118,7 +118,7 @@
 	UNSIGNED Size, Min, Available, Waiting;
 	VOID *pStartAddress;
 	NU_TASK *First;
-	CHAR Name[8];
+	CHAR Name[NU_MAX_NAME];
 
 	if (os_GetMemoryPoolEntry(Index, &Handle) == OS_ERROR)
 		return(OS_ERROR);
@@ -201,7 +201,7 @@
 {
 	T_OS_PART_POOL *pool;
 	UNSIGNED dummy, allocated, available;
-	CHAR Name[8];
+	CHAR Name[NU_MAX_NAME];
 
 	for (pool = PartGrpTable[gr_hndl].grp_head; pool; pool = pool->next) {
 		if (!size)
@@ -223,3 +223,19 @@
 	*m_free = 0;
 	return(OS_ERROR);
 }
+
+GLOBAL LONG
+os_GetPartitionGroupHandle(OS_HANDLE Caller, char *Name, OS_HANDLE *GroupHandle)
+{
+	int i;
+
+	for (i = 0; i <= MaxPoolGroups; i++) {
+		if (!PartGrpTable[i].grp_head)
+			continue;
+		if (strncmp(Name, PartGrpTable[i].name, RESOURCE_NAMELEN-1))
+			continue;
+		*GroupHandle = i;
+		return(OS_OK);
+	}
+	return(OS_ERROR);
+}