f6ed55a348
currently do ext3 resizing inside parted (#367101) - Update the xvd patch to include 'xvd' in the string table that parted uses when printing device types (#366971) - Do not install the linux.h or gnu.h headers
67 lines
2.9 KiB
Diff
67 lines
2.9 KiB
Diff
diff -up parted-1.8.6/include/parted/device.h.xvd parted-1.8.6/include/parted/device.h
|
|
--- parted-1.8.6/include/parted/device.h.xvd 2007-01-12 10:15:10.000000000 -0500
|
|
+++ parted-1.8.6/include/parted/device.h 2007-11-05 14:00:59.000000000 -0500
|
|
@@ -45,11 +45,11 @@ typedef enum {
|
|
PED_DEVICE_UBD = 8,
|
|
PED_DEVICE_DASD = 9,
|
|
PED_DEVICE_VIODASD = 10,
|
|
- PED_DEVICE_SX8 = 11
|
|
+ PED_DEVICE_SX8 = 11,
|
|
#ifdef ENABLE_DEVICE_MAPPER
|
|
- ,
|
|
- PED_DEVICE_DM = 12
|
|
+ PED_DEVICE_DM = 12,
|
|
#endif
|
|
+ PED_DEVICE_XVD = 13
|
|
} PedDeviceType;
|
|
|
|
typedef struct _PedDevice PedDevice;
|
|
diff -up parted-1.8.6/libparted/arch/linux.c.xvd parted-1.8.6/libparted/arch/linux.c
|
|
--- parted-1.8.6/libparted/arch/linux.c.xvd 2007-03-19 20:57:51.000000000 -0400
|
|
+++ parted-1.8.6/libparted/arch/linux.c 2007-11-05 14:00:59.000000000 -0500
|
|
@@ -254,6 +254,7 @@ struct blkdev_ioctl_param {
|
|
#define VIODASD_MAJOR 112
|
|
#define SX8_MAJOR1 160
|
|
#define SX8_MAJOR2 161
|
|
+#define XVD_MAJOR 202
|
|
|
|
#define SCSI_BLK_MAJOR(M) ( \
|
|
(M) == SCSI_DISK0_MAJOR \
|
|
@@ -456,6 +457,8 @@ _device_probe_type (PedDevice* dev)
|
|
} else if (_is_dm_major(dev_major)) {
|
|
dev->type = PED_DEVICE_DM;
|
|
#endif
|
|
+ } else if (dev_major == XVD_MAJOR && (dev_minor % 0x10 == 0)) {
|
|
+ dev->type = PED_DEVICE_XVD;
|
|
} else {
|
|
dev->type = PED_DEVICE_UNKNOWN;
|
|
}
|
|
@@ -1158,6 +1161,11 @@ linux_new (const char* path)
|
|
break;
|
|
#endif
|
|
|
|
+ case PED_DEVICE_XVD:
|
|
+ if (!init_generic (dev, _("Xen Virtual Block Device")))
|
|
+ goto error_free_arch_specific;
|
|
+ break;
|
|
+
|
|
case PED_DEVICE_UNKNOWN:
|
|
if (!init_generic (dev, _("Unknown")))
|
|
goto error_free_arch_specific;
|
|
diff -up parted-1.8.6/parted/parted.c.xvd parted-1.8.6/parted/parted.c
|
|
--- parted-1.8.6/parted/parted.c.xvd 2007-11-05 14:00:59.000000000 -0500
|
|
+++ parted-1.8.6/parted/parted.c 2007-11-05 14:02:10.000000000 -0500
|
|
@@ -1227,9 +1227,10 @@ do_print (PedDevice** dev)
|
|
int has_free_arg = 0;
|
|
int has_list_arg = 0;
|
|
int has_num_arg = 0;
|
|
- char* transport[13] = {"unknown", "scsi", "ide", "dac960",
|
|
+ char* transport[14] = {"unknown", "scsi", "ide", "dac960",
|
|
"cpqarray", "file", "ataraid", "i2o",
|
|
- "ubd", "dasd", "viodasd", "sx8", "dm"};
|
|
+ "ubd", "dasd", "viodasd", "sx8", "dm",
|
|
+ "xvd"};
|
|
char* peek_word;
|
|
char* start;
|
|
char* end;
|