Skip to contentSkip to conversation

cluster/gfs2/libgfs2 misc.c

Cluster-devel [email protected] 1 participant 1 message Feb 15, 2008

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Changes by: fabbione at sourceware.org 2008-02-15 08:01:43

Modified files:
gfs2/libgfs2 : misc.c

Log message:

	Fix http://bugs.debian.org/465790

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=cluster&r1=1.6&r2=1.7

gfs2/libgfs2/misc.c +3 -2
@@ -27,6 +27,7 @@
 #include <sys/file.h>
 #include <dirent.h>
 #include <linux/kdev_t.h>
+#include <sys/sysmacros.h>
 
 #include "libgfs2.h"
 
@@ -617,8 +618,8 @@
 		return NULL;
 
 	memset(device_id, 0, sizeof(device_id));
-	sprintf(device_id, "%u:%u", (uint32_t)MAJOR(statbuf.st_dev),
-		(uint32_t)MINOR(statbuf.st_dev));
+	sprintf(device_id, "%i:%i", major(statbuf.st_dev),
+		minor(statbuf.st_dev));
 
 	d = opendir(SYS_BASE);
 	if (!d)