parted/etherd_support.diff

53 lines
2.1 KiB
Diff

---
include/parted/device.h | 3 ++-
libparted/arch/linux.c | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
Index: include/parted/device.h
===================================================================
--- include/parted/device.h.orig 2009-11-06 19:31:18.000000000 +0100
+++ include/parted/device.h 2010-02-02 13:10:06.000000000 +0100
@@ -46,7 +46,8 @@ typedef enum {
PED_DEVICE_DM = 12,
PED_DEVICE_XVD = 13,
PED_DEVICE_SDMMC = 14,
- PED_DEVICE_VIRTBLK = 15
+ PED_DEVICE_VIRTBLK = 15,
+ PED_DEVICE_AOE = 16
} PedDeviceType;
typedef struct _PedDevice PedDevice;
Index: libparted/arch/linux.c
===================================================================
--- libparted/arch/linux.c.orig 2009-12-20 12:38:23.000000000 +0100
+++ libparted/arch/linux.c 2010-02-02 13:13:27.000000000 +0100
@@ -248,6 +248,7 @@ struct blkdev_ioctl_param {
#define I2O_MAJOR7 86
#define I2O_MAJOR8 87
#define UBD_MAJOR 98
+#define AOE_MAJOR 152
#define DASD_MAJOR 94
#define VIODASD_MAJOR 112
#define SX8_MAJOR1 160
@@ -541,6 +542,8 @@ _device_probe_type (PedDevice* dev)
dev->type = PED_DEVICE_DAC960;
} else if (dev_major == ATARAID_MAJOR && (dev_minor % 0x10 == 0)) {
dev->type = PED_DEVICE_ATARAID;
+ } else if (dev_major == AOE_MAJOR && (dev_minor % 0x10 == 0)) {
+ dev->type = PED_DEVICE_AOE;
} else if (dev_major == DASD_MAJOR && (dev_minor % 0x4 == 0)) {
dev->type = PED_DEVICE_DASD;
} else if (dev_major == VIODASD_MAJOR && (dev_minor % 0x8 == 0)) {
@@ -1310,6 +1313,11 @@ linux_new (const char* path)
goto error_free_arch_specific;
break;
+ case PED_DEVICE_AOE:
+ if (!init_generic (dev, _("AoE Driver")))
+ goto error_free_arch_specific;
+ break;
+
#if defined __s390__ || defined __s390x__
case PED_DEVICE_DASD:
if (!init_dasd (dev, _("IBM S390 DASD drive")))