]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] sd.c major number off-by-one
authorAdam Kropelin <akropel1@rochester.rr.com>
Tue, 29 Oct 2002 12:46:44 +0000 (04:46 -0800)
committerAnton Blanchard <anton@samba.org>
Tue, 29 Oct 2002 12:46:44 +0000 (04:46 -0800)
Fix an off-by-one error in the simplified SD_MAJOR macro which not only
botches up the sd majors but also steals away the major used by my
favorite slow-than-dirt SCSI RAID controller: cpqarray. Please, can I
have it back?

drivers/scsi/sd.c

index 9a7766fc9c6bcb82ed5d3b592e76820a1372c9d5..c43ab0c28946f2df97b13a8b303be96128bc50c9 100644 (file)
@@ -58,7 +58,7 @@
  * Remaining dev_t-handling stuff
  */
 #define SD_MAJORS      8
-#define SD_MAJOR(i)    ((i) ? SCSI_DISK1_MAJOR+(i) : SCSI_DISK0_MAJOR)
+#define SD_MAJOR(i)    ((i) ? SCSI_DISK1_MAJOR-1+(i) : SCSI_DISK0_MAJOR)
 
 /*
  * Time out in seconds for disks and Magneto-opticals (which are slower).