Hi,

On 07/20/2010 04:16 PM, Jim Meyering wrote:
Hans de Goede wrote:
libparted/arch/linux.c(SCSI_BLK_MAJOR): recognize high majors
---
  NEWS                   |    2 ++
  libparted/arch/linux.c |   11 ++++++++++-

Thanks, Hans.

That looks fine and passes "make check syntax-check".
Is it feasible to test for this using scsi_debug?

Well if you create atleast 8 fake disks with it the 8th
should definitely end up in the high major range.

Regards,

Hans



I tweaked the log message and have just pushed this:

From 92cb1fef83e2c84ddfc3a420f4fd384257116992 Mon Sep 17 00:00:00 2001
From: Hans de Goede<[email protected]>
Date: Tue, 20 Jul 2010 12:17:53 +0200
Subject: [PATCH] linux: recognize scsi disks with a high major number (128-135)

* libparted/arch/linux.c (SCSI_BLK_MAJOR): Recognize high major number.
---
  NEWS                   |    2 ++
  libparted/arch/linux.c |   11 ++++++++++-
  2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 45bd2bf..a1863fc 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ GNU parted NEWS                                    -*- outline 
-*-
    libparted once again recognizes a whole-disk FAT partition
    [bug introduced in parted-1.9.0]

+  libparted now recognizes scsi disks with a high major (128-135) as scsi
+  disks

  * Noteworthy changes in release 2.3 (2010-05-28) [stable]

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 38f4e31..b1f7dc9 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -220,6 +220,14 @@ struct blkdev_ioctl_param {
  #define SCSI_DISK5_MAJOR        69
  #define SCSI_DISK6_MAJOR        70
  #define SCSI_DISK7_MAJOR        71
+#define SCSI_DISK8_MAJOR        128
+#define SCSI_DISK9_MAJOR        129
+#define SCSI_DISK10_MAJOR       130
+#define SCSI_DISK11_MAJOR       131
+#define SCSI_DISK12_MAJOR       132
+#define SCSI_DISK13_MAJOR       133
+#define SCSI_DISK14_MAJOR       134
+#define SCSI_DISK15_MAJOR       135
  #define COMPAQ_SMART2_MAJOR     72
  #define COMPAQ_SMART2_MAJOR1    73
  #define COMPAQ_SMART2_MAJOR2    74
@@ -260,7 +268,8 @@ struct blkdev_ioctl_param {
  #define SCSI_BLK_MAJOR(M) (                                             \
                  (M) == SCSI_DISK0_MAJOR                                 \
                  || (M) == SCSI_CDROM_MAJOR                              \
-                || ((M)>= SCSI_DISK1_MAJOR&&  (M)<= SCSI_DISK7_MAJOR))
+                || ((M)>= SCSI_DISK1_MAJOR&&  (M)<= SCSI_DISK7_MAJOR) \
+                || ((M)>= SCSI_DISK8_MAJOR&&  (M)<= SCSI_DISK15_MAJOR))

  /* Maximum number of partitions supported by linux. */
  #define MAX_NUM_PARTS         64
--
1.7.2.rc3.475.g72d0

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to