parted/parted-2.2-hi-major-sd-rh611691.patch
2010-12-17 11:22:49 -05:00

40 lines
1.7 KiB
Diff

From: Masahiro Matsuya <mmatsuya@redhat.com>
Date: Tue, 6 Jul 2010 03:43:32 +0900
Subject: [PATCH] Recognize devices with major number 128,129,...135 as SCSI
Devices with major number 128,129,...135 are not recognized as SCSI devices.
This patch fixes it.
---
linux.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff -up parted-2.1/libparted/arch/linux.c.original parted-2.1/libparted/arch/linux.c
--- parted-2.1/libparted/arch/linux.c.original 2010-07-06 15:05:19.921823935 +0900
+++ parted-2.1/libparted/arch/linux.c 2010-07-06 16:42:16.420762063 +0900
@@ -221,6 +221,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
@@ -259,7 +267,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