aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h
diff options
context:
space:
mode:
Diffstat (limited to 'xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h')
-rw-r--r--xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h
index 42da335c4a..3d219eeedc 100644
--- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h
+++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_block.h
@@ -35,6 +35,12 @@
#define DPRINTK_IOCTL(_f, _a...) ((void)0)
#endif
+/* IDE/SCSI have <= 32 partitions per device. VIRT has <= 16. */
+#define PARTN_SHIFT(_dev) ((MAJOR(_dev)==XLVIRT_MAJOR) ? 4 : 5)
+#define XLIDE_PARTN_SHIFT 5
+#define XLSCSI_PARTN_SHIFT 5
+#define XLVIRT_PARTN_SHIFT 4
+
/*
* We have one of these per XL-IDE, XL-SCSI, and XL-VIRT device.
* They hang in an array off the gendisk structure. We may end up putting