summaryrefslogtreecommitdiff
blob: 2265db400c8bdd7bb140cb6107a7c99734e475b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff -ruN e2fsprogs-1.33.orig/misc/util.c e2fsprogs-1.33/misc/util.c
--- e2fsprogs-1.33.orig/misc/util.c	2003-03-02 01:29:00.000000000 +0100
+++ e2fsprogs-1.33/misc/util.c	2003-10-18 20:06:46.866581288 +0200
@@ -108,8 +108,20 @@
 #define MAJOR(dev)	((dev)>>8)
 #define MINOR(dev)	((dev) & 0xff)
 #endif
+
+#ifndef SCSI_DISK_MAJOR
+#ifdef SCSI_DISK8_MAJOR
+#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
+	((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR) || \
+	((M) >= SCSI_DISK8_MAJOR && (M) <= SCSI_DISK15_MAJOR))
+#else
+#define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \
+	((M) >= SCSI_DISK1_MAJOR && (M) <= SCSI_DISK7_MAJOR))
+#endif
+#endif
+
 #ifndef SCSI_BLK_MAJOR
-#define SCSI_BLK_MAJOR(M)  ((M) == SCSI_DISK_MAJOR || (M) == SCSI_CDROM_MAJOR)
+#define SCSI_BLK_MAJOR(M)  (SCSI_DISK_MAJOR(M) || (M) == SCSI_CDROM_MAJOR)
 #endif
 	if (((MAJOR(s.st_rdev) == HD_MAJOR &&
 	      MINOR(s.st_rdev)%64 == 0) ||