diff options
author | Benjamin Marzinski <bmarzins@sourceware.org> | 2009-10-02 22:01:24 +0200 |
---|---|---|
committer | Christophe Varoqui <christophe.varoqui@free.fr> | 2009-10-02 22:01:24 +0200 |
commit | d9043cece2c04905bcdfea6c600651fd8e4e0be6 (patch) | |
tree | c6ea78832c743dcd142dda6f067b88a9ee08bc35 | |
parent | 6a3b111e5e1fb6661a6fe4ff5a44397128279a10 (diff) | |
download | multipath-tools-d9043cece2c04905bcdfea6c600651fd8e4e0be6.tar.gz multipath-tools-d9043cece2c04905bcdfea6c600651fd8e4e0be6.tar.bz2 multipath-tools-d9043cece2c04905bcdfea6c600651fd8e4e0be6.zip |
[kpartx] make kpartx deal with more than 256 minor numbers
Fix for bz #526550. Fix kpartx MAKEDEV macro so it can deal with more
than 256 minor numbers.
-rw-r--r-- | kpartx/devmapper.c | 1 | ||||
-rw-r--r-- | kpartx/devmapper.h | 4 | ||||
-rw-r--r-- | kpartx/kpartx.c | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/kpartx/devmapper.c b/kpartx/devmapper.c index 48d2998..dea1501 100644 --- a/kpartx/devmapper.c +++ b/kpartx/devmapper.c @@ -7,7 +7,6 @@ #include <stdint.h> #include <libdevmapper.h> #include <ctype.h> -#include <linux/kdev_t.h> #include <errno.h> #include "devmapper.h" diff --git a/kpartx/devmapper.h b/kpartx/devmapper.h index 7ac0bf1..09cdced 100644 --- a/kpartx/devmapper.h +++ b/kpartx/devmapper.h @@ -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); int dm_addmap (int, const char *, const char *, const char *, uint64_t, diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c index 2e0d97d..b61a81f 100644 --- a/kpartx/kpartx.c +++ b/kpartx/kpartx.c @@ -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" |