[Ocfs2-commits] mfasheh commits r1674 - branches/dlm-glue/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Nov 23 20:51:21 CST 2004
Author: mfasheh
Date: 2004-11-23 20:51:19 -0600 (Tue, 23 Nov 2004)
New Revision: 1674
Modified:
branches/dlm-glue/src/super.c
Log:
* group name needs to be a printable string
Modified: branches/dlm-glue/src/super.c
===================================================================
--- branches/dlm-glue/src/super.c 2004-11-24 02:43:45 UTC (rev 1673)
+++ branches/dlm-glue/src/super.c 2004-11-24 02:51:19 UTC (rev 1674)
@@ -860,21 +860,23 @@
static int ocfs2_fill_local_node_info(ocfs_super *osb, char **group_name)
{
- int status;
+ int status, i;
struct inode *group = NULL;
+ char *p;
if (group_name) {
osb->group_name = *group_name;
*group_name = NULL;
} else {
- osb->group_name = kmalloc(NM_MAX_NAME_LEN, GFP_KERNEL);
+ osb->group_name = kmalloc(NM_MAX_NAME_LEN + 1, GFP_KERNEL);
if (!osb->group_name) {
status = -ENOMEM;
LOG_ERROR_STATUS(status);
goto bail;
}
- memset(osb->group_name, 0, NM_MAX_NAME_LEN);
- memcpy(osb->group_name, osb->uuid, MAX_VOL_ID_LENGTH);
+ memset(osb->group_name, 0, NM_MAX_NAME_LEN + 1);
+ for (i = 0, p = osb->uuid; i < MAX_VOL_ID_LENGTH; i++, p += 2)
+ sprintf(p, "%02X", osb->uuid[i]);
}
group = nm_get_group_by_name(osb->group_name);
More information about the Ocfs2-commits
mailing list