]> git.pld-linux.org Git - packages/parted.git/blob - parted-sx8.patch
- updated to 1.7.1 (note: new soname)
[packages/parted.git] / parted-sx8.patch
1 --- parted-1.7.0/include/parted/device.h.P3     2006-05-15 05:19:17.000000000 -0400
2 +++ parted-1.7.0/include/parted/device.h        2006-05-19 10:24:48.000000000 -0400
3 @@ -42,7 +42,8 @@
4          PED_DEVICE_FILE         = 5,
5          PED_DEVICE_ATARAID      = 6,
6          PED_DEVICE_I2O          = 7,
7 -        PED_DEVICE_UBD          = 8
8 +        PED_DEVICE_UBD          = 8,
9 +        PED_DEVICE_SX8          = 11
10  } PedDeviceType;
11  
12  typedef struct _PedDevice PedDevice;
13 --- parted-1.7.0/libparted/arch/linux.c.P3      2006-05-15 05:19:52.000000000 -0400
14 +++ parted-1.7.0/libparted/arch/linux.c 2006-05-19 10:23:14.000000000 -0400
15 @@ -229,6 +229,8 @@
16  #define I2O_MAJOR7              86
17  #define I2O_MAJOR8              87
18  #define UBD_MAJOR               98
19 +#define SX8_MAJOR1              160
20 +#define SX8_MAJOR2              161
21  
22  #define SCSI_BLK_MAJOR(M) (                                             \
23                  (M) == SCSI_DISK0_MAJOR                                 \
24 @@ -269,6 +271,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 @@ -317,6 +325,8 @@
38                  dev->type = PED_DEVICE_DAC960;
39          } else if (dev_major == ATARAID_MAJOR && (dev_minor % 0x10 == 0)) {
40                  dev->type = PED_DEVICE_ATARAID;
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 @@ -904,6 +914,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.079974 seconds and 3 git commands to generate.