patch-2.1.126 linux/include/linux/blk.h
Next file: linux/include/linux/capability.h
Previous file: linux/include/asm-sparc64/fcntl.h
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Fri Oct 23 10:15:50 1998
- Orig file:
v2.1.125/linux/include/linux/blk.h
- Orig date:
Fri Jul 31 17:06:37 1998
diff -u --recursive --new-file v2.1.125/linux/include/linux/blk.h linux/include/linux/blk.h
@@ -147,13 +147,13 @@
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
-#elif (MAJOR_NR == SCSI_DISK_MAJOR)
+#elif (SCSI_DISK_MAJOR(MAJOR_NR))
#define DEVICE_NAME "scsidisk"
#define DEVICE_INTR do_sd
#define TIMEOUT_VALUE (2*HZ)
#define DEVICE_REQUEST do_sd_request
-#define DEVICE_NR(device) (MINOR(device) >> 4)
+#define DEVICE_NR(device) (((MAJOR(device) & SD_MAJOR_MASK) << (8 - 4)) + (MINOR(device) >> 4))
#define DEVICE_ON(device)
#define DEVICE_OFF(device)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov