]> git.pld-linux.org Git - packages/parted.git/blob - parted-sx8.patch
- obsolete
[packages/parted.git] / parted-sx8.patch
1 --- parted-1.6.19/include/parted/device.h.sx8   2004-12-14 16:02:31.591464768 -0500
2 +++ parted-1.6.19/include/parted/device.h       2004-12-14 16:03:19.154234128 -0500
3 @@ -36,7 +36,8 @@
4         PED_DEVICE_ATARAID      = 6,
5         PED_DEVICE_I2O          = 7,
6         PED_DEVICE_DASD         = 8,
7 -       PED_DEVICE_VIODASD      = 9
8 +       PED_DEVICE_VIODASD      = 9,
9 +        PED_DEVICE_SX8          = 10
10  } PedDeviceType;
11  
12  typedef struct _PedDevice PedDevice;
13 --- parted-1.6.19/libparted/linux.c.sx8 2004-12-14 16:02:31.591464768 -0500
14 +++ parted-1.6.19/libparted/linux.c     2004-12-14 16:03:04.981388728 -0500
15 @@ -217,6 +217,8 @@
16  #define I2O_MAJOR6             85
17  #define I2O_MAJOR7             86
18  #define I2O_MAJOR8             87
19 +#define SX8_MAJOR1              160
20 +#define SX8_MAJOR2              161
21  
22  #define DASD_MAJOR             94
23  #define VIODASD_MAJOR          112
24 @@ -260,6 +262,12 @@
25  }
26  
27  static int
28 +_is_sx8_major (int major)
29 +{
30 +       return (SX8_MAJOR1 <= major && major <= SX8_MAJOR2);
31 +}
32 +
33 +static int
34  _device_stat (PedDevice* dev, struct stat * dev_stat)
35  {
36         PED_ASSERT (dev != NULL, return 0);
37 @@ -312,6 +320,8 @@
38                 dev->type = PED_DEVICE_DASD;
39         } else if (dev_major == VIODASD_MAJOR && (dev_minor % 0x8 == 0)) {
40                 dev->type = PED_DEVICE_VIODASD;
41 +       } else if (_is_sx8_major(dev_major) && (dev_minor % 0x20 == 0)) {
42 +               dev->type = PED_DEVICE_SX8;
43         } else if (_is_i2o_major (dev_major) && (dev_minor % 0x10 == 0)) {
44                 dev->type = PED_DEVICE_I2O;
45         } else if (_is_cpqarray_major (dev_major) && (dev_minor % 0x10 == 0)) {
46 @@ -860,6 +870,11 @@
47                         goto error_free_arch_specific;
48                 break;
49  
50 +       case PED_DEVICE_SX8:
51 +               if (!init_generic (dev, _("Promise SX8 SATA Device")))
52 +                       goto error_free_arch_specific;
53 +               break;
54 +
55         case PED_DEVICE_CPQARRAY:
56                 if (!init_generic (dev, _("Compaq Smart Array")))
57                         goto error_free_arch_specific;
This page took 0.030133 seconds and 3 git commands to generate.