Skip to contentSkip to conversation

multipath-tools devmap_name/devmap_name.c kpar ...

PATCH [email protected] 1 participant 1 message Oct 16, 2009 Device mapper

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/dm
Module name: multipath-tools
Branch: RHEL4_FC5
Changes by: [email protected] 2009-10-16 19:58:10

Modified files:
devmap_name : devmap_name.c
kpartx : devmapper.c devmapper.h kpartx.c

Log message:

	Fix for bz #528734.  kpartx now correctly handles minor numbers greater than
	255.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/devmap_name/devmap_name.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.3&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/kpartx/devmapper.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.6.2.3&r2=1.6.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/kpartx/devmapper.h.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.3.2.3&r2=1.3.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/kpartx/kpartx.c.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.7.2.4&r2=1.7.2.5

devmap_name/devmap_name.c +0 -1
@@ -6,7 +6,6 @@
 #include <string.h>
 #include <ctype.h>
 #include <unistd.h>
-#include <linux/kdev_t.h>
 #include <libdevmapper.h>
 
 static void usage(char * progname) {
kpartx/devmapper.c +0 -1
@@ -7,7 +7,6 @@
 #include <stdint.h>
 #include <libdevmapper.h>
 #include <ctype.h>
-#include <linux/kdev_t.h>
 #include <errno.h>
 #include "devmapper.h"
 
kpartx/devmapper.h +4 -0
@@ -1,3 +1,7 @@
+#define MAJOR(dev)      ((dev & 0xfff00) >> 8)
+#define MINOR(dev)      ((dev & 0xff) | ((dev >> 12) & 0xfff00))
+#define MKDEV(ma,mi)    ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12))
+
 int dm_prereq (char *, int, int, int);
 int dm_simplecmd (int, const char *);
 int dm_addmap (int, const char *, const char *, const char *, uint64_t,
kpartx/kpartx.c +0 -1
@@ -30,7 +30,6 @@
 #include <sys/types.h>
 #include <ctype.h>
 #include <libdevmapper.h>
-#include <linux/kdev_t.h>
 
 #include "devmapper.h"
 #include "crc32.h"