@@ -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) {
@@ -7,7 +7,6 @@
#include <stdint.h>
#include <libdevmapper.h>
#include <ctype.h>
-#include <linux/kdev_t.h>
#include <errno.h>
#include "devmapper.h"
@@ -1,5 +1,9 @@
#include <stdint.h>
+#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,
@@ -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"