aboutsummaryrefslogtreecommitdiffstats
path: root/tools/blktap/lib
diff options
context:
space:
mode:
authorAndrew Warfield <andy@xensource.com>2006-09-28 12:47:45 -0700
committerAndrew Warfield <andy@xensource.com>2006-09-28 12:47:45 -0700
commit9dd368070b9306df3f7493e8db4dac34d3ec9322 (patch)
tree808807bcd97bf4bcfa9989acacc68e3f3528d499 /tools/blktap/lib
parent8e7cc683c5c25acf26ec48b6c20d3da17a0089a1 (diff)
downloadxen-9dd368070b9306df3f7493e8db4dac34d3ec9322.tar.gz
xen-9dd368070b9306df3f7493e8db4dac34d3ec9322.tar.bz2
xen-9dd368070b9306df3f7493e8db4dac34d3ec9322.zip
[BLKTAP] have blktap use a dynamic major
blktap currently uses a hardcoded major of 254 for the device. This is not robust in anyway and needs to be dynamic. Note: it is better not to have the daemon create the node, and have udev create it instead. But since the daemon currently creates the node anyway, it is still the way this is done. That change needs to be made at another time. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'tools/blktap/lib')
-rw-r--r--tools/blktap/lib/blktaplib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/blktap/lib/blktaplib.h b/tools/blktap/lib/blktaplib.h
index e1d2289ced..7f1d4f1a94 100644
--- a/tools/blktap/lib/blktaplib.h
+++ b/tools/blktap/lib/blktaplib.h
@@ -80,9 +80,10 @@ static inline int BLKTAP_MODE_VALID(unsigned long arg)
#define MAX_PENDING_REQS 64
#define BLKTAP_DEV_DIR "/dev/xen"
#define BLKTAP_DEV_NAME "blktap"
-#define BLKTAP_DEV_MAJOR 254
#define BLKTAP_DEV_MINOR 0
+extern int blktap_major;
+
#define BLKTAP_RING_PAGES 1 /* Front */
#define BLKTAP_MMAP_REGION_SIZE (BLKTAP_RING_PAGES + MMAP_PAGES)