patch-2.1.126 linux/drivers/scsi/sd.h

Next file: linux/drivers/scsi/sd_ioctl.c
Previous file: linux/drivers/scsi/sd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.125/linux/drivers/scsi/sd.h linux/drivers/scsi/sd.h
@@ -42,6 +42,11 @@
 
 extern int revalidate_scsidisk(kdev_t dev, int maxusage);
 
+#define N_SD_MAJORS	8
+
+#define SD_MAJOR_MASK	(N_SD_MAJORS - 1)
+#define SD_PARTITION(i)		(((MAJOR(i) & SD_MAJOR_MASK) << 8) | (MINOR(i) & 255))
+
 #endif
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov