aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/parted/parted-1.8.6/1004parted-1.8.6-xvd1.patch
blob: 17ec29a7eb290019d166373f838e4dca5e52607f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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-08-07 14:05:59.000000000 -0400
+++ parted-1.8.6/libparted/arch/linux.c	2007-08-07 14:07:13.000000000 -0400
@@ -248,6 +248,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                                 \
@@ -450,6 +451,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;
         }
@@ -1152,6 +1155,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/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-08-07 14:07:13.000000000 -0400
@@ -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;