Remove old patches.
This commit is contained in:
parent
48d71e9401
commit
04a0d3538f
@ -1,113 +0,0 @@
|
||||
diff -up parted-1.8.8/libparted/labels/bsd.c.alpha parted-1.8.8/libparted/labels/bsd.c
|
||||
--- parted-1.8.8/libparted/labels/bsd.c.alpha 2007-07-23 07:58:31.000000000 -1000
|
||||
+++ parted-1.8.8/libparted/labels/bsd.c 2008-02-05 14:34:01.000000000 -1000
|
||||
@@ -108,6 +108,9 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
uint8_t type;
|
||||
+ int boot;
|
||||
+ int raid;
|
||||
+ int lvm;
|
||||
} BSDPartitionData;
|
||||
|
||||
static PedDiskType bsd_disk_type;
|
||||
@@ -394,6 +397,9 @@ bsd_partition_new (const PedDisk* disk,
|
||||
if (!bsd_data)
|
||||
goto error_free_part;
|
||||
bsd_data->type = 0;
|
||||
+ bsd_data->boot = 0;
|
||||
+ bsd_data->raid = 0;
|
||||
+ bsd_data->lvm = 0;
|
||||
} else {
|
||||
part->disk_specific = NULL;
|
||||
}
|
||||
@@ -423,6 +429,9 @@ bsd_partition_duplicate (const PedPartit
|
||||
old_bsd_data = (BSDPartitionData*) part->disk_specific;
|
||||
new_bsd_data = (BSDPartitionData*) new_part->disk_specific;
|
||||
new_bsd_data->type = old_bsd_data->type;
|
||||
+ new_bsd_data->boot = old_bsd_data->boot;
|
||||
+ new_bsd_data->raid = old_bsd_data->raid;
|
||||
+ new_bsd_data->lvm = old_bsd_data->lvm;
|
||||
return new_part;
|
||||
}
|
||||
|
||||
@@ -456,14 +465,61 @@ bsd_partition_set_system (PedPartition*
|
||||
static int
|
||||
bsd_partition_set_flag (PedPartition* part, PedPartitionFlag flag, int state)
|
||||
{
|
||||
- /* no flags for bsd */
|
||||
+ PedDisk* disk;
|
||||
+// PedPartition* walk; // since -Werror, this unused variable would break build
|
||||
+ BSDPartitionData* bsd_data;
|
||||
+
|
||||
+ PED_ASSERT (part != NULL, return 0);
|
||||
+ PED_ASSERT (part->disk_specific != NULL, return 0);
|
||||
+ PED_ASSERT (part->disk != NULL, return 0);
|
||||
+
|
||||
+ bsd_data = part->disk_specific;
|
||||
+ disk = part->disk;
|
||||
+
|
||||
+ switch (flag) {
|
||||
+ case PED_PARTITION_BOOT:
|
||||
+ bsd_data->boot = state;
|
||||
+ return 1;
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ if (state) {
|
||||
+ bsd_data->lvm = 0;
|
||||
+ }
|
||||
+ bsd_data->raid = state;
|
||||
+ return 1;
|
||||
+ case PED_PARTITION_LVM:
|
||||
+ if (state) {
|
||||
+ bsd_data->raid = 0;
|
||||
+ }
|
||||
+ bsd_data->lvm = state;
|
||||
+ return 1;
|
||||
+ default:
|
||||
+ ;
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
bsd_partition_get_flag (const PedPartition* part, PedPartitionFlag flag)
|
||||
{
|
||||
- /* no flags for bsd */
|
||||
+ BSDPartitionData* bsd_data;
|
||||
+
|
||||
+ PED_ASSERT (part != NULL, return 0);
|
||||
+ PED_ASSERT (part->disk_specific != NULL, return 0);
|
||||
+
|
||||
+ bsd_data = part->disk_specific;
|
||||
+ switch (flag) {
|
||||
+ case PED_PARTITION_BOOT:
|
||||
+ return bsd_data->boot;
|
||||
+
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ return bsd_data->raid;
|
||||
+
|
||||
+ case PED_PARTITION_LVM:
|
||||
+ return bsd_data->lvm;
|
||||
+
|
||||
+ default:
|
||||
+ ;
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -471,7 +527,14 @@ static int
|
||||
bsd_partition_is_flag_available (const PedPartition* part,
|
||||
PedPartitionFlag flag)
|
||||
{
|
||||
- /* no flags for bsd */
|
||||
+ switch (flag) {
|
||||
+ case PED_PARTITION_BOOT:
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ case PED_PARTITION_LVM:
|
||||
+ return 1;
|
||||
+ default:
|
||||
+ ;
|
||||
+ }
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,186 +0,0 @@
|
||||
diff -up parted-1.8.8/include/parted/disk.h.appletv parted-1.8.8/include/parted/disk.h
|
||||
--- parted-1.8.8/include/parted/disk.h.appletv 2007-08-09 11:20:33.000000000 -0400
|
||||
+++ parted-1.8.8/include/parted/disk.h 2008-06-05 16:04:16.000000000 -0400
|
||||
@@ -52,10 +52,11 @@ enum _PedPartitionFlag {
|
||||
PED_PARTITION_HPSERVICE=8,
|
||||
PED_PARTITION_PALO=9,
|
||||
PED_PARTITION_PREP=10,
|
||||
- PED_PARTITION_MSFT_RESERVED=11
|
||||
+ PED_PARTITION_MSFT_RESERVED=11,
|
||||
+ PED_PARTITION_APPLE_TV_RECOVERY=12
|
||||
};
|
||||
#define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT
|
||||
-#define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_RESERVED
|
||||
+#define PED_PARTITION_LAST_FLAG PED_PARTITION_APPLE_TV_RECOVERY
|
||||
|
||||
enum _PedDiskTypeFeature {
|
||||
PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */
|
||||
diff -up parted-1.8.8/libparted/disk.c.appletv parted-1.8.8/libparted/disk.c
|
||||
--- parted-1.8.8/libparted/disk.c.appletv 2007-08-09 14:47:57.000000000 -0400
|
||||
+++ parted-1.8.8/libparted/disk.c 2008-06-05 16:04:16.000000000 -0400
|
||||
@@ -2181,6 +2181,8 @@ ped_partition_flag_get_name (PedPartitio
|
||||
return N_("prep");
|
||||
case PED_PARTITION_MSFT_RESERVED:
|
||||
return N_("msftres");
|
||||
+ case PED_PARTITION_APPLE_TV_RECOVERY:
|
||||
+ return N_("atvrecv");
|
||||
|
||||
default:
|
||||
ped_exception_throw (
|
||||
diff -up parted-1.8.8/libparted/labels/gpt.c.appletv parted-1.8.8/libparted/labels/gpt.c
|
||||
--- parted-1.8.8/libparted/labels/gpt.c.appletv 2008-06-05 16:04:16.000000000 -0400
|
||||
+++ parted-1.8.8/libparted/labels/gpt.c 2008-06-05 17:27:07.000000000 -0400
|
||||
@@ -122,6 +122,10 @@ typedef struct {
|
||||
((efi_guid_t) { PED_CPU_TO_LE32 (0x48465300), PED_CPU_TO_LE16 (0x0000), \
|
||||
PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \
|
||||
{ 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }})
|
||||
+#define PARTITION_APPLE_TV_RECOVERY_GUID \
|
||||
+ ((efi_guid_t) { PED_CPU_TO_LE32 (0x5265636F), PED_CPU_TO_LE16 (0x7665), \
|
||||
+ PED_CPU_TO_LE16 (0x11AA), 0xaa, 0x11, \
|
||||
+ { 0x00, 0x30, 0x65, 0x43, 0xEC, 0xAC }})
|
||||
|
||||
struct __attribute__ ((packed)) _GuidPartitionTableHeader_t {
|
||||
uint64_t Signature;
|
||||
@@ -249,6 +253,7 @@ typedef struct _GPTPartitionData {
|
||||
int hp_service;
|
||||
int hidden;
|
||||
int msftres;
|
||||
+ int atvrecv;
|
||||
} GPTPartitionData;
|
||||
|
||||
static PedDiskType gpt_disk_type;
|
||||
@@ -759,7 +764,8 @@ _parse_part_entry (PedDisk* disk, GuidPa
|
||||
|
||||
gpt_part_data->lvm = gpt_part_data->raid
|
||||
= gpt_part_data->boot = gpt_part_data->hp_service
|
||||
- = gpt_part_data->hidden = gpt_part_data->msftres = 0;
|
||||
+ = gpt_part_data->hidden = gpt_part_data->msftres
|
||||
+ = gpt_part_data->atvrecv = 0;
|
||||
|
||||
if (pte->Attributes.RequiredToFunction & 0x1)
|
||||
gpt_part_data->hidden = 1;
|
||||
@@ -774,6 +780,8 @@ _parse_part_entry (PedDisk* disk, GuidPa
|
||||
gpt_part_data->hp_service = 1;
|
||||
else if (!guid_cmp (gpt_part_data->type, PARTITION_MSFT_RESERVED_GUID))
|
||||
gpt_part_data->msftres = 1;
|
||||
+ else if (!guid_cmp (gpt_part_data->type, PARTITION_APPLE_TV_RECOVERY_GUID))
|
||||
+ gpt_part_data->atvrecv = 1;
|
||||
|
||||
return part;
|
||||
}
|
||||
@@ -1202,6 +1210,7 @@ gpt_partition_new (const PedDisk* disk,
|
||||
gpt_part_data->hp_service = 0;
|
||||
gpt_part_data->hidden = 0;
|
||||
gpt_part_data->msftres = 0;
|
||||
+ gpt_part_data->atvrecv = 0;
|
||||
uuid_generate ((unsigned char*) &gpt_part_data->uuid);
|
||||
swap_uuid_and_efi_guid((unsigned char*)(&gpt_part_data->uuid));
|
||||
strcpy (gpt_part_data->name, "");
|
||||
@@ -1285,15 +1294,26 @@ gpt_partition_set_system (PedPartition*
|
||||
gpt_part_data->type = PARTITION_MSFT_RESERVED_GUID;
|
||||
return 1;
|
||||
}
|
||||
+ if (gpt_part_data->atvrecv) {
|
||||
+ gpt_part_data->type = PARTITION_APPLE_TV_RECOVERY_GUID;
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
if (fs_type) {
|
||||
- if (strncmp (fs_type->name, "fat", 3) == 0
|
||||
- || strcmp (fs_type->name, "ntfs") == 0) {
|
||||
+ if (!strncmp (fs_type->name, "fat", 3) == 0
|
||||
+ || !strcmp (fs_type->name, "ntfs") == 0) {
|
||||
gpt_part_data->type = PARTITION_MSFT_RESERVED_GUID;
|
||||
return 1;
|
||||
}
|
||||
- if (strncmp (fs_type->name, "hfs", 3) == 0) {
|
||||
- gpt_part_data->type = PARTITION_APPLE_HFS_GUID;
|
||||
+ if (!strncmp (fs_type->name, "hfs", 3) == 0) {
|
||||
+ if (!guid_cmp (gpt_part_data->type,
|
||||
+ PARTITION_APPLE_TV_RECOVERY_GUID)
|
||||
+ || gpt_part_data->atvrecv) {
|
||||
+ gpt_part_data->type =
|
||||
+ PARTITION_APPLE_TV_RECOVERY_GUID;
|
||||
+ } else {
|
||||
+ gpt_part_data->type = PARTITION_APPLE_HFS_GUID;
|
||||
+ }
|
||||
return 1;
|
||||
}
|
||||
if (strstr (fs_type->name, "swap")) {
|
||||
@@ -1376,7 +1396,8 @@ gpt_partition_set_flag(PedPartition *par
|
||||
gpt_part_data->raid
|
||||
= gpt_part_data->lvm
|
||||
= gpt_part_data->hp_service
|
||||
- = gpt_part_data->msftres = 0;
|
||||
+ = gpt_part_data->msftres
|
||||
+ = gpt_part_data->atvrecv = 0;
|
||||
return gpt_partition_set_system (part, part->fs_type);
|
||||
case PED_PARTITION_RAID:
|
||||
gpt_part_data->raid = state;
|
||||
@@ -1384,7 +1405,8 @@ gpt_partition_set_flag(PedPartition *par
|
||||
gpt_part_data->boot
|
||||
= gpt_part_data->lvm
|
||||
= gpt_part_data->hp_service
|
||||
- = gpt_part_data->msftres = 0;
|
||||
+ = gpt_part_data->msftres
|
||||
+ = gpt_part_data->atvrecv = 0;
|
||||
return gpt_partition_set_system (part, part->fs_type);
|
||||
case PED_PARTITION_LVM:
|
||||
gpt_part_data->lvm = state;
|
||||
@@ -1392,7 +1414,8 @@ gpt_partition_set_flag(PedPartition *par
|
||||
gpt_part_data->boot
|
||||
= gpt_part_data->raid
|
||||
= gpt_part_data->hp_service
|
||||
- = gpt_part_data->msftres = 0;
|
||||
+ = gpt_part_data->msftres
|
||||
+ = gpt_part_data->atvrecv = 0;
|
||||
return gpt_partition_set_system (part, part->fs_type);
|
||||
case PED_PARTITION_HPSERVICE:
|
||||
gpt_part_data->hp_service = state;
|
||||
@@ -1400,7 +1423,8 @@ gpt_partition_set_flag(PedPartition *par
|
||||
gpt_part_data->boot
|
||||
= gpt_part_data->raid
|
||||
= gpt_part_data->lvm
|
||||
- = gpt_part_data->msftres = 0;
|
||||
+ = gpt_part_data->msftres
|
||||
+ = gpt_part_data->atvrecv = 0;
|
||||
return gpt_partition_set_system (part, part->fs_type);
|
||||
case PED_PARTITION_MSFT_RESERVED:
|
||||
gpt_part_data->msftres = state;
|
||||
@@ -1408,7 +1432,18 @@ gpt_partition_set_flag(PedPartition *par
|
||||
gpt_part_data->boot
|
||||
= gpt_part_data->raid
|
||||
= gpt_part_data->lvm
|
||||
- = gpt_part_data->hp_service = 0;
|
||||
+ = gpt_part_data->hp_service
|
||||
+ = gpt_part_data->atvrecv = 0;
|
||||
+ return gpt_partition_set_system (part, part->fs_type);
|
||||
+ case PED_PARTITION_APPLE_TV_RECOVERY:
|
||||
+ gpt_part_data->atvrecv = state;
|
||||
+ if (state)
|
||||
+ gpt_part_data->boot
|
||||
+ = gpt_part_data->raid
|
||||
+ = gpt_part_data->lvm
|
||||
+ = gpt_part_data->hp_service
|
||||
+ = gpt_part_data->msftres = 0;
|
||||
+
|
||||
return gpt_partition_set_system (part, part->fs_type);
|
||||
case PED_PARTITION_HIDDEN:
|
||||
gpt_part_data->hidden = state;
|
||||
@@ -1440,6 +1475,8 @@ gpt_partition_get_flag(const PedPartitio
|
||||
return gpt_part_data->hp_service;
|
||||
case PED_PARTITION_MSFT_RESERVED:
|
||||
return gpt_part_data->msftres;
|
||||
+ case PED_PARTITION_APPLE_TV_RECOVERY:
|
||||
+ return gpt_part_data->atvrecv;
|
||||
case PED_PARTITION_HIDDEN:
|
||||
return gpt_part_data->hidden;
|
||||
case PED_PARTITION_SWAP:
|
||||
@@ -1461,6 +1498,7 @@ gpt_partition_is_flag_available(const Pe
|
||||
case PED_PARTITION_BOOT:
|
||||
case PED_PARTITION_HPSERVICE:
|
||||
case PED_PARTITION_MSFT_RESERVED:
|
||||
+ case PED_PARTITION_APPLE_TV_RECOVERY:
|
||||
case PED_PARTITION_HIDDEN:
|
||||
return 1;
|
||||
case PED_PARTITION_SWAP:
|
@ -1,13 +0,0 @@
|
||||
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
||||
index 83e24c8..8734ab7 100644
|
||||
--- a/libparted/arch/linux.c
|
||||
+++ b/libparted/arch/linux.c
|
||||
@@ -2107,6 +2107,8 @@ _mount_table_search (const char* file_name, dev_t dev)
|
||||
return 0;
|
||||
while (fgets (line, 512, file)) {
|
||||
junk = sscanf (line, "%s", part_name);
|
||||
+ if (part_name[0] != '/')
|
||||
+ continue;
|
||||
if (stat (part_name, &part_stat) == 0) {
|
||||
if (part_stat.st_rdev == dev) {
|
||||
fclose (file);
|
@ -1,13 +0,0 @@
|
||||
diff -up parted-1.8.8/include/parted/device.h.devmapper parted-1.8.8/include/parted/device.h
|
||||
--- parted-1.8.8/include/parted/device.h.devmapper 2007-07-31 09:03:53.000000000 -1000
|
||||
+++ parted-1.8.8/include/parted/device.h 2007-12-18 12:27:10.000000000 -1000
|
||||
@@ -45,9 +45,7 @@ typedef enum {
|
||||
PED_DEVICE_DASD = 9,
|
||||
PED_DEVICE_VIODASD = 10,
|
||||
PED_DEVICE_SX8 = 11,
|
||||
-#ifdef ENABLE_DEVICE_MAPPER
|
||||
PED_DEVICE_DM = 12,
|
||||
-#endif
|
||||
PED_DEVICE_XVD = 13
|
||||
} PedDeviceType;
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff -up parted-1.8.8/libparted/labels/dos.c.swap parted-1.8.8/libparted/labels/dos.c
|
||||
--- parted-1.8.8/libparted/labels/dos.c.swap 2009-03-23 17:21:21.000000000 -1000
|
||||
+++ parted-1.8.8/libparted/labels/dos.c 2009-03-23 17:24:57.000000000 -1000
|
||||
@@ -1411,6 +1411,12 @@ msdos_partition_set_flag (PedPartition*
|
||||
dos_data->prep = state;
|
||||
return ped_partition_set_system (part, part->fs_type);
|
||||
|
||||
+ case PED_PARTITION_SWAP:
|
||||
+ if (state) {
|
||||
+ return ped_partition_set_system (part, ped_file_system_type_get("linux-swap"));
|
||||
+ }
|
||||
+ //break;
|
||||
+
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
diff -up parted-1.8.8/libparted/labels/gpt.c.swap parted-1.8.8/libparted/labels/gpt.c
|
||||
diff -up parted-1.8.8/libparted/labels/mac.c.swap parted-1.8.8/libparted/labels/mac.c
|
@ -1,28 +0,0 @@
|
||||
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
|
||||
index e513a05..81d8600 100644
|
||||
--- a/libparted/labels/dos.c
|
||||
+++ b/libparted/labels/dos.c
|
||||
@@ -192,14 +192,16 @@ msdos_probe (const PedDevice *dev)
|
||||
if (PED_LE16_TO_CPU (part_table->magic) != MSDOS_MAGIC)
|
||||
goto probe_fail;
|
||||
|
||||
- /* if this is a FAT fs, fail here. Note that the Smart Boot Manager
|
||||
- * Loader (SBML) signature indicates a partition table, not a file
|
||||
- * system.
|
||||
+ /* If this is a FAT fs, fail here. Checking for the FAT signature
|
||||
+ * has some false positives; instead, do what the Linux kernel does
|
||||
+ * and ensure that each partition has a boot indicator that is
|
||||
+ * either 0 or 0x80.
|
||||
*/
|
||||
- if ((!strncmp (part_table->boot_code + 0x36, "FAT", 3)
|
||||
- && strncmp (part_table->boot_code + 0x40, "SBML", 4) != 0)
|
||||
- || !strncmp (part_table->boot_code + 0x52, "FAT", 3))
|
||||
- goto probe_fail;
|
||||
+ for (i = 0; i < 4; i++) {
|
||||
+ if (part_table->partitions[i].boot_ind != 0
|
||||
+ && part_table->partitions[i].boot_ind != 0x80)
|
||||
+ goto probe_fail;
|
||||
+ }
|
||||
|
||||
/* If this is a GPT disk, fail here */
|
||||
for (i = 0; i < 4; i++) {
|
@ -1,172 +0,0 @@
|
||||
diff -up parted-1.8.8/include/parted/natmath.h.gcc43 parted-1.8.8/include/parted/natmath.h
|
||||
--- parted-1.8.8/include/parted/natmath.h.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||
+++ parted-1.8.8/include/parted/natmath.h 2008-02-04 12:15:26.000000000 -1000
|
||||
@@ -86,10 +86,8 @@ ped_alignment_is_aligned (const PedAlign
|
||||
extern const PedAlignment* ped_alignment_any;
|
||||
extern const PedAlignment* ped_alignment_none;
|
||||
|
||||
-extern inline PedSector
|
||||
-ped_div_round_up (PedSector numerator, PedSector divisor);
|
||||
-
|
||||
-extern inline PedSector
|
||||
+extern PedSector ped_div_round_up (PedSector numerator, PedSector divisor);
|
||||
+extern PedSector
|
||||
ped_div_round_to_nearest (PedSector numerator, PedSector divisor);
|
||||
|
||||
#endif /* PED_NATMATH_H_INCLUDED */
|
||||
diff -up parted-1.8.8/libparted/fs/fat/traverse.c.gcc43 parted-1.8.8/libparted/fs/fat/traverse.c
|
||||
--- parted-1.8.8/libparted/fs/fat/traverse.c.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||
+++ parted-1.8.8/libparted/fs/fat/traverse.c 2008-02-04 16:08:28.000000000 -1000
|
||||
@@ -342,9 +342,11 @@ fat_dir_entry_has_first_cluster (FatDirE
|
||||
void
|
||||
fat_dir_entry_get_name (FatDirEntry*dir_entry, char *result) {
|
||||
int i;
|
||||
- char *src;
|
||||
+ char *src;
|
||||
+ uint8_t *ext;
|
||||
|
||||
src = dir_entry->name;
|
||||
+ ext = dir_entry->extension;
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
if (src[i] == ' ' || src[i] == 0) break;
|
||||
@@ -353,9 +355,9 @@ fat_dir_entry_get_name (FatDirEntry*dir_
|
||||
|
||||
if (src[8] != ' ' && src[8] != 0) {
|
||||
*result++ = '.';
|
||||
- for (i=8; i<11; i++) {
|
||||
- if (src[i] == ' ' || src[i] == 0) break;
|
||||
- *result++ = src[i];
|
||||
+ for (i=0; i<3; i++) {
|
||||
+ if (ext[i] == ' ' || ext[i] == 0) break;
|
||||
+ *result++ = ext[i];
|
||||
}
|
||||
}
|
||||
|
||||
diff -up parted-1.8.8/libparted/cs/natmath.c.gcc43 parted-1.8.8/libparted/cs/natmath.c
|
||||
--- parted-1.8.8/libparted/cs/natmath.c.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||
+++ parted-1.8.8/libparted/cs/natmath.c 2008-02-04 12:14:58.000000000 -1000
|
||||
@@ -74,16 +74,16 @@ ped_round_down_to (PedSector sector, Ped
|
||||
return sector - abs_mod (sector, grain_size);
|
||||
}
|
||||
|
||||
-inline PedSector
|
||||
+PedSector
|
||||
ped_div_round_up (PedSector numerator, PedSector divisor)
|
||||
{
|
||||
return (numerator + divisor - 1) / divisor;
|
||||
}
|
||||
|
||||
-inline PedSector
|
||||
+PedSector
|
||||
ped_div_round_to_nearest (PedSector numerator, PedSector divisor)
|
||||
{
|
||||
- return (numerator + divisor/2) / divisor;
|
||||
+ return (numerator + divisor / 2) / divisor;
|
||||
}
|
||||
|
||||
/* Rounds a number up to the closest number that is a multiple of
|
||||
diff -up parted-1.8.8/parted/ui.c.gcc43 parted-1.8.8/parted/ui.c
|
||||
--- parted-1.8.8/parted/ui.c.gcc43 2007-07-23 07:58:31.000000000 -1000
|
||||
+++ parted-1.8.8/parted/ui.c 2008-02-05 12:20:13.000000000 -1000
|
||||
@@ -297,15 +297,17 @@ _dump_history (void)
|
||||
|
||||
#endif /* HAVE_LIBREADLINE */
|
||||
|
||||
+#ifndef SA_SIGINFO
|
||||
static void
|
||||
mask_signal()
|
||||
{
|
||||
sigset_t curr;
|
||||
sigset_t prev;
|
||||
-
|
||||
+
|
||||
sigfillset(&curr);
|
||||
sigprocmask(SIG_SETMASK, &curr, &prev);
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Resets the environment by jumping to the initial state
|
||||
* saved during ui intitialisation.
|
||||
@@ -318,7 +320,7 @@ reset_env (int quit)
|
||||
int in_readline = readline_state.in_readline;
|
||||
|
||||
readline_state.in_readline = 0;
|
||||
-
|
||||
+
|
||||
if (in_readline) {
|
||||
putchar ('\n');
|
||||
if (quit)
|
||||
@@ -339,6 +341,7 @@ sa_sigint_handler (int signum, siginfo_t
|
||||
reset_env (0);
|
||||
}
|
||||
|
||||
+#ifndef SA_SIGINFO
|
||||
/* Signal handler for SIGINT using 'signal'. */
|
||||
static void
|
||||
s_sigint_handler (int signum)
|
||||
@@ -347,6 +350,7 @@ s_sigint_handler (int signum)
|
||||
mask_signal ();
|
||||
sa_sigint_handler (signum, NULL, NULL);
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Signal handler for SIGSEGV using 'sigaction'. */
|
||||
static void
|
||||
@@ -383,6 +387,7 @@ sa_sigsegv_handler (int signum, siginfo_
|
||||
abort ();
|
||||
}
|
||||
|
||||
+#ifndef SA_SIGINFO
|
||||
/* Signal handler for SIGSEGV using 'signal'. */
|
||||
static void
|
||||
s_sigsegv_handler (int signum)
|
||||
@@ -391,6 +396,7 @@ s_sigsegv_handler (int signum)
|
||||
mask_signal ();
|
||||
sa_sigsegv_handler (signum, NULL, NULL);
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Signal handler for SIGFPE using 'sigaction'. */
|
||||
static void
|
||||
@@ -456,6 +462,7 @@ sa_sigfpe_handler (int signum, siginfo_t
|
||||
abort ();
|
||||
}
|
||||
|
||||
+#ifndef SA_SIGINFO
|
||||
/* Signal handler for SIGFPE using 'signal'. */
|
||||
static void
|
||||
s_sigfpe_handler (int signum)
|
||||
@@ -464,6 +471,7 @@ s_sigfpe_handler (int signum)
|
||||
mask_signal ();
|
||||
sa_sigfpe_handler (signum, NULL, NULL);
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* Signal handler for SIGILL using 'sigaction'. */
|
||||
static void
|
||||
@@ -528,6 +536,7 @@ sa_sigill_handler (int signum, siginfo_t
|
||||
abort ();
|
||||
}
|
||||
|
||||
+#ifndef SA_SIGINFO
|
||||
/* Signal handler for SIGILL using 'signal'. */
|
||||
static void
|
||||
s_sigill_handler (int signum)
|
||||
@@ -536,6 +545,7 @@ s_sigill_handler (int signum)
|
||||
mask_signal ();
|
||||
sa_sigill_handler (signum, NULL, NULL);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static char*
|
||||
_readline (const char* prompt, const StrList* possibilities)
|
||||
@@ -1402,7 +1412,7 @@ init_ui ()
|
||||
sig_int.sa_mask =
|
||||
sig_fpe.sa_mask =
|
||||
sig_ill.sa_mask = curr;
|
||||
-
|
||||
+
|
||||
sig_segv.sa_flags =
|
||||
sig_int.sa_flags =
|
||||
sig_fpe.sa_flags =
|
@ -1,32 +0,0 @@
|
||||
diff -up parted-1.8.8/doc/C/parted.8.manpage parted-1.8.8/doc/C/parted.8
|
||||
--- parted-1.8.8/doc/C/parted.8.manpage 2007-05-14 05:24:17.000000000 -1000
|
||||
+++ parted-1.8.8/doc/C/parted.8 2007-12-18 12:36:08.000000000 -1000
|
||||
@@ -109,8 +109,7 @@ or an LVM logical volume if necessary.
|
||||
.TP
|
||||
.B set \fIpartition\fP \fIflag\fP \fIstate\fP
|
||||
Change the state of the \fIflag\fP on \fIpartition\fP to \fIstate\fP.
|
||||
-Supported flags are: "boot", "root", "swap", "hidden", "raid", "lvm", "lba",
|
||||
-and "palo".
|
||||
+Supported flags are: "boot" (Mac, MS-DOS, PC98), "root" (Mac), "swap" (Mac), "hidden" (MS-DOS, PC98), "raid" (MS-DOS), "lvm" (MS-DOS), "lba" (MS-DOS), and "palo" (MS-DOS).
|
||||
\fIstate\fP should be either "on" or "off".
|
||||
.TP
|
||||
.B unit \fIunit\fP
|
||||
@@ -124,6 +123,18 @@ and a human-friendly form for output).
|
||||
.B version
|
||||
Display version information and a copyright message.
|
||||
.RE
|
||||
+.SH KNOWN ISSUES
|
||||
+ext3 filesystem resizing does not currently work, please use
|
||||
+.BR resize2fs (8)
|
||||
+instead.
|
||||
+
|
||||
+Resizing partitions with an ext3 filesystem will not generally work because
|
||||
+of the above issue. Use
|
||||
+.BR resize2fs (8)
|
||||
+to resize the filesystem and resize the partition manually using
|
||||
+.BR fdisk (8)
|
||||
+or a similar tool. For LVM situations, you will need to use the LVM commands
|
||||
+to resize the LVM elements.
|
||||
.SH REPORTING BUGS
|
||||
Report bugs to <bug-parted@gnu.org>
|
||||
.SH SEE ALSO
|
@ -1,34 +0,0 @@
|
||||
diff -ur parted-1.8.8/lib/regex_internal.h parted-1.8.8-newgcc4.4/lib/regex_internal.h
|
||||
--- parted-1.8.8/lib/regex_internal.h 2007-06-06 20:35:17.000000000 +0200
|
||||
+++ parted-1.8.8-newgcc4.4/lib/regex_internal.h 2009-02-26 21:35:11.000000000 +0100
|
||||
@@ -182,10 +182,6 @@
|
||||
# if BITSET_WORD_BITS <= SBC_MAX
|
||||
# error "Invalid SBC_MAX"
|
||||
# endif
|
||||
-#elif BITSET_WORD_MAX == (0xffffffff + 2) * 0xffffffff
|
||||
-/* Work around a bug in 64-bit PGC (before version 6.1-2), where the
|
||||
- preprocessor mishandles large unsigned values as if they were signed. */
|
||||
-# define BITSET_WORD_BITS 64
|
||||
#else
|
||||
# error "Add case for new bitset_word_t size"
|
||||
#endif
|
||||
diff -ur parted-1.8.8/libparted/fs/fat/fat.c parted-1.8.8-newgcc4.4/libparted/fs/fat/fat.c
|
||||
--- parted-1.8.8/libparted/fs/fat/fat.c 2007-07-23 19:58:31.000000000 +0200
|
||||
+++ parted-1.8.8-newgcc4.4/libparted/fs/fat/fat.c 2009-02-26 21:37:11.000000000 +0100
|
||||
@@ -267,10 +267,13 @@
|
||||
static uint32_t
|
||||
_gen_new_serial_number ()
|
||||
{
|
||||
- uuid_t uuid;
|
||||
+ union {
|
||||
+ uuid_t uuid;
|
||||
+ uint32_t i;
|
||||
+ } uu32;
|
||||
|
||||
- uuid_generate (uuid);
|
||||
- return * (uint32_t*) &uuid [0];
|
||||
+ uuid_generate (uu32.uuid);
|
||||
+ return uu32.i;
|
||||
}
|
||||
|
||||
PedFileSystem*
|
@ -1,322 +0,0 @@
|
||||
diff -up parted-1.8.8/libparted/labels/gpt.c.nofixgpt parted-1.8.8/libparted/labels/gpt.c
|
||||
--- parted-1.8.8/libparted/labels/gpt.c.nofixgpt 2007-07-31 13:36:57.000000000 -0400
|
||||
+++ parted-1.8.8/libparted/labels/gpt.c 2008-04-10 14:20:05.000000000 -0400
|
||||
@@ -233,6 +233,7 @@ struct __attribute__ ((packed)) _LegacyM
|
||||
/* uses libparted's disk_specific field in PedDisk, to store our info */
|
||||
struct __attribute__ ((packed)) _GPTDiskData {
|
||||
PedGeometry data_area;
|
||||
+ PedSector agpt_location;
|
||||
int entry_count;
|
||||
efi_guid_t uuid;
|
||||
};
|
||||
@@ -542,6 +543,7 @@ gpt_alloc (const PedDevice * dev)
|
||||
ped_geometry_init (&gpt_disk_data->data_area, dev, data_start,
|
||||
data_end - data_start + 1);
|
||||
gpt_disk_data->entry_count = GPT_DEFAULT_PARTITION_ENTRIES;
|
||||
+ gpt_disk_data->agpt_location = disk->dev->length - 1;
|
||||
uuid_generate ((unsigned char*) &gpt_disk_data->uuid);
|
||||
swap_uuid_and_efi_guid((unsigned char*)(&gpt_disk_data->uuid));
|
||||
return disk;
|
||||
@@ -571,6 +573,7 @@ gpt_duplicate (const PedDisk* disk)
|
||||
old_disk_data->data_area.length);
|
||||
new_disk_data->entry_count = old_disk_data->entry_count;
|
||||
new_disk_data->uuid = old_disk_data->uuid;
|
||||
+ new_disk_data->agpt_location = old_disk_data->agpt_location;
|
||||
return new_disk;
|
||||
}
|
||||
|
||||
@@ -632,12 +635,13 @@ _read_header (const PedDevice* dev, Guid
|
||||
|
||||
static int
|
||||
_parse_header (PedDisk* disk, GuidPartitionTableHeader_t* gpt,
|
||||
- int *update_needed)
|
||||
+ int *update_needed, int alternate, PedSector agpt_location)
|
||||
{
|
||||
GPTDiskData* gpt_disk_data = disk->disk_specific;
|
||||
PedSector first_usable;
|
||||
PedSector last_usable;
|
||||
PedSector last_usable_if_grown, last_usable_min_default;
|
||||
+ PedSector last_within_agpt;
|
||||
static int asked_already;
|
||||
|
||||
PED_ASSERT (_header_is_valid (disk->dev, gpt), return 0);
|
||||
@@ -670,26 +674,28 @@ _parse_header (PedDisk* disk, GuidPartit
|
||||
parted invocation.
|
||||
*/
|
||||
|
||||
- last_usable_if_grown
|
||||
- = PED_CPU_TO_LE64 (disk->dev->length - 2 -
|
||||
+ last_within_agpt = PED_LE64_TO_CPU ( gpt->AlternateLBA ) - 1;
|
||||
+ if (alternate)
|
||||
+ last_within_agpt = agpt_location - 1;
|
||||
+ PED_ASSERT (last_within_agpt <= disk->dev->length - 2, return 0);
|
||||
+
|
||||
+ last_usable_if_grown = PED_CPU_TO_LE64 ( last_within_agpt -
|
||||
((PedSector)(PED_LE32_TO_CPU(gpt->NumberOfPartitionEntries)) *
|
||||
(PedSector)(PED_LE32_TO_CPU(gpt->SizeOfPartitionEntry)) /
|
||||
disk->dev->sector_size));
|
||||
|
||||
- last_usable_min_default = disk->dev->length - 2 -
|
||||
+ last_usable_min_default = last_within_agpt -
|
||||
GPT_DEFAULT_PARTITION_ENTRY_ARRAY_SIZE / disk->dev->sector_size;
|
||||
|
||||
- if ( last_usable_if_grown > last_usable_min_default ) {
|
||||
-
|
||||
+ if ( last_usable_if_grown > last_usable_min_default )
|
||||
last_usable_if_grown = last_usable_min_default;
|
||||
- }
|
||||
-
|
||||
|
||||
PED_ASSERT (last_usable > first_usable, return 0);
|
||||
- PED_ASSERT (last_usable <= disk->dev->length, return 0);
|
||||
+ PED_ASSERT (last_within_agpt <= disk->dev->length - 2, return 0);
|
||||
+ PED_ASSERT (last_usable <= disk->dev->length - 2, return 0);
|
||||
|
||||
PED_ASSERT (last_usable_if_grown > first_usable, return 0);
|
||||
- PED_ASSERT (last_usable_if_grown <= disk->dev->length, return 0);
|
||||
+ PED_ASSERT (last_usable_if_grown <= disk->dev->length - 2, return 0);
|
||||
|
||||
if ( !asked_already && last_usable < last_usable_if_grown ) {
|
||||
|
||||
@@ -719,7 +725,7 @@ _parse_header (PedDisk* disk, GuidPartit
|
||||
ped_geometry_init (&gpt_disk_data->data_area, disk->dev,
|
||||
first_usable, last_usable - first_usable + 1);
|
||||
|
||||
-
|
||||
+ gpt_disk_data->agpt_location = PED_LE64_TO_CPU(gpt->AlternateLBA);
|
||||
gpt_disk_data->entry_count
|
||||
= PED_LE32_TO_CPU (gpt->NumberOfPartitionEntries);
|
||||
PED_ASSERT (gpt_disk_data->entry_count > 0, return 0);
|
||||
@@ -794,18 +800,23 @@ _parse_part_entry (PedDisk* disk, GuidPa
|
||||
* for users to use Parted to "fix up" their disk if they
|
||||
* really want it to be considered GPT.
|
||||
************************************************************/
|
||||
+/************************************************************
|
||||
+ * Right now, we have no infrastructure for per-disklabel
|
||||
+ * commands, so we can't really directly offer to fix this
|
||||
+ * interactively. I'm leaving the code around anyway in
|
||||
+ * hopes it'll become useful someday. -- pjones
|
||||
+ ************************************************************/
|
||||
+#if 0
|
||||
static int
|
||||
-gpt_read (PedDisk * disk)
|
||||
+gpt_is_small(PedDisk * disk)
|
||||
{
|
||||
- GPTDiskData *gpt_disk_data = disk->disk_specific;
|
||||
GuidPartitionTableHeader_t* gpt;
|
||||
- GuidPartitionEntry_t* ptes;
|
||||
- int ptes_size;
|
||||
- int i;
|
||||
+ int ret = 0;
|
||||
+
|
||||
#ifndef DISCOVER_ONLY
|
||||
- int write_back = 0;
|
||||
+ int write_back;
|
||||
#endif
|
||||
-
|
||||
+
|
||||
ped_disk_delete_all (disk);
|
||||
|
||||
/*
|
||||
@@ -813,78 +824,131 @@ gpt_read (PedDisk * disk)
|
||||
* ped_disk_probe(), they probably didn't get a choice...
|
||||
*/
|
||||
if (!gpt_probe (disk->dev))
|
||||
- goto error;
|
||||
+ return 0;
|
||||
|
||||
if (_read_header (disk->dev, &gpt, 1)) {
|
||||
PED_ASSERT ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA)
|
||||
<= disk->dev->length - 1, goto error_free_gpt);
|
||||
if ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA)
|
||||
< disk->dev->length - 1) {
|
||||
- char* zeros = ped_malloc (pth_get_size (disk->dev));
|
||||
|
||||
-#ifndef DISCOVER_ONLY
|
||||
+#ifdef DISCOVER_ONLY
|
||||
+ if (ped_exception_throw (
|
||||
+ PED_EXCEPTION_ERROR,
|
||||
+ PED_EXCEPTION_CANCEL,
|
||||
+ _("The backup GPT table is not at the end of the disk, as it "
|
||||
+ "should be. This might means that operating systems may "
|
||||
+ "believe the disk is of a smaller size."))
|
||||
+ == PED_EXCEPTION_CANCEL)
|
||||
+ goto error_free_gpt;
|
||||
+#else
|
||||
if (ped_exception_throw (
|
||||
PED_EXCEPTION_ERROR,
|
||||
PED_EXCEPTION_FIX | PED_EXCEPTION_CANCEL,
|
||||
_("The backup GPT table is not at the end of the disk, as it "
|
||||
- "should be. This might mean that another operating system "
|
||||
- "believes the disk is smaller. Fix, by moving the backup "
|
||||
- "to the end (and removing the old backup)?"))
|
||||
+ "should be. This might means that operating systems may "
|
||||
+ "believe the disk is of a smaller size. Fix, by moving the "
|
||||
+ "backup to the end?"))
|
||||
== PED_EXCEPTION_CANCEL)
|
||||
goto error_free_gpt;
|
||||
|
||||
+ gpt->AlternateLBA =
|
||||
+ PED_CPU_TO_LE64(disk->dev->length - 1);
|
||||
write_back = 1;
|
||||
- memset (zeros, 0, disk->dev->sector_size);
|
||||
- ped_device_write (disk->dev, zeros,
|
||||
- PED_LE64_TO_CPU (gpt->AlternateLBA),
|
||||
- 1);
|
||||
-#endif /* !DISCOVER_ONLY */
|
||||
+#endif
|
||||
}
|
||||
- } else { /* primary GPT *not* ok */
|
||||
- int alternate_ok = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (write_back)
|
||||
+ ped_disk_commit_to_dev (disk);
|
||||
+
|
||||
+ ret = 1;
|
||||
+
|
||||
+error_delete_all:
|
||||
+ ped_disk_delete_all (disk);
|
||||
+error_free_gpt:
|
||||
+ pth_free (gpt);
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static int
|
||||
+gpt_read (PedDisk * disk)
|
||||
+{
|
||||
+ GPTDiskData *gpt_disk_data = disk->disk_specific;
|
||||
+ GuidPartitionTableHeader_t* pgpt = NULL;
|
||||
+ GuidPartitionTableHeader_t* agpt = NULL;
|
||||
+ GuidPartitionEntry_t* ptes;
|
||||
+ PedSector agpt_location = 0;
|
||||
+ int ptes_size;
|
||||
+ int i;
|
||||
+ int primary_ok = 0;
|
||||
+ int alternate_ok = 0;
|
||||
|
||||
#ifndef DISCOVER_ONLY
|
||||
- write_back = 1;
|
||||
+ int write_back = 0;
|
||||
#endif
|
||||
|
||||
- if ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA)
|
||||
- < disk->dev->length - 1) {
|
||||
- alternate_ok = _read_header (disk->dev, &gpt,
|
||||
- PED_LE64_TO_CPU(gpt->AlternateLBA));
|
||||
- }
|
||||
- if (!alternate_ok) {
|
||||
- alternate_ok = _read_header (disk->dev, &gpt,
|
||||
- disk->dev->length - 1);
|
||||
- }
|
||||
+ ped_disk_delete_all (disk);
|
||||
|
||||
- if (alternate_ok) {
|
||||
- if (ped_exception_throw (
|
||||
- PED_EXCEPTION_ERROR,
|
||||
- PED_EXCEPTION_OK_CANCEL,
|
||||
- _("The primary GPT table is corrupt, but the "
|
||||
- "backup appears OK, so that will be used."))
|
||||
- == PED_EXCEPTION_CANCEL)
|
||||
- goto error_free_gpt;
|
||||
- } else {
|
||||
- ped_exception_throw (
|
||||
- PED_EXCEPTION_ERROR,
|
||||
- PED_EXCEPTION_CANCEL,
|
||||
- _("Both the primary and backup GPT tables "
|
||||
- "are corrupt. Try making a fresh table, "
|
||||
- "and using Parted's rescue feature to "
|
||||
- "recover partitions."));
|
||||
- goto error;
|
||||
+ if (!gpt_probe (disk->dev))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (_read_header (disk->dev, &pgpt, 1)) {
|
||||
+ primary_ok = 1;
|
||||
+ if ((PedSector) PED_LE64_TO_CPU (pgpt->AlternateLBA)
|
||||
+ <= disk->dev->length - 1) {
|
||||
+ agpt_location = PED_LE64_TO_CPU (pgpt->AlternateLBA);
|
||||
+ alternate_ok = _read_header (disk->dev, &agpt,
|
||||
+ agpt_location);
|
||||
}
|
||||
}
|
||||
|
||||
- if (!_parse_header (disk, gpt, &write_back))
|
||||
- goto error_free_gpt;
|
||||
+ if (!alternate_ok) {
|
||||
+ agpt_location = disk->dev->length - 1;
|
||||
+ alternate_ok = _read_header (disk->dev, &agpt,
|
||||
+ disk->dev->length - 1);
|
||||
+ }
|
||||
+
|
||||
+ if (alternate_ok && !_parse_header (disk, agpt, &write_back, 1,
|
||||
+ agpt_location))
|
||||
+ alternate_ok = 0;
|
||||
|
||||
+ if (primary_ok && !_parse_header (disk, pgpt, &write_back, 0, 0))
|
||||
+ primary_ok = 0;
|
||||
+
|
||||
+#ifndef DISCOVER_ONLY
|
||||
+ if (!primary_ok || !alternate_ok)
|
||||
+ write_back = 1;
|
||||
+#endif
|
||||
+
|
||||
+ if (!primary_ok && !alternate_ok) {
|
||||
+ ped_exception_throw (
|
||||
+ PED_EXCEPTION_ERROR,
|
||||
+ PED_EXCEPTION_CANCEL,
|
||||
+ _("Both the primary and backup GPT tables "
|
||||
+ "are corrupt. Try making a fresh table, "
|
||||
+ "and using Parted's rescue feature to "
|
||||
+ "recover partitions."));
|
||||
+ goto error_free_gpts;
|
||||
+ }
|
||||
+
|
||||
+ if (!primary_ok) {
|
||||
+ if (pgpt)
|
||||
+ pth_free (pgpt);
|
||||
+ pgpt = agpt;
|
||||
+ agpt = NULL;
|
||||
+
|
||||
+ pgpt->AlternateLBA = PED_CPU_TO_LE64 (disk->dev->length - 1);
|
||||
+ }
|
||||
+
|
||||
+ if (!alternate_ok && agpt)
|
||||
+ pth_free (agpt);
|
||||
|
||||
ptes_size = sizeof (GuidPartitionEntry_t) * gpt_disk_data->entry_count;
|
||||
ptes = (GuidPartitionEntry_t*) ped_malloc (ptes_size);
|
||||
if (!ped_device_read (disk->dev, ptes,
|
||||
- PED_LE64_TO_CPU(gpt->PartitionEntryLBA),
|
||||
+ PED_LE64_TO_CPU(pgpt->PartitionEntryLBA),
|
||||
ptes_size / disk->dev->sector_size))
|
||||
goto error_free_ptes;
|
||||
|
||||
@@ -922,9 +986,12 @@ error_delete_all:
|
||||
ped_disk_delete_all (disk);
|
||||
error_free_ptes:
|
||||
ped_free (ptes);
|
||||
-error_free_gpt:
|
||||
- pth_free (gpt);
|
||||
-error:
|
||||
+error_free_gpts:
|
||||
+ if (pgpt)
|
||||
+ pth_free (pgpt);
|
||||
+ if (agpt)
|
||||
+ pth_free (agpt);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -980,7 +1047,9 @@ _generate_header (const PedDisk* disk, i
|
||||
= PED_CPU_TO_LE64 (disk->dev->length - 1 - ptes_size);
|
||||
} else {
|
||||
gpt->MyLBA = PED_CPU_TO_LE64 (1);
|
||||
- gpt->AlternateLBA = PED_CPU_TO_LE64 (disk->dev->length - 1);
|
||||
+ gpt->AlternateLBA = gpt_disk_data->agpt_location
|
||||
+ ? PED_CPU_TO_LE64 (gpt_disk_data->agpt_location)
|
||||
+ : PED_CPU_TO_LE64 (disk->dev->length - 1);
|
||||
gpt->PartitionEntryLBA = PED_CPU_TO_LE64 (2);
|
||||
}
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff -up parted-1.8.8/include/parted/Makefile.am.noinst parted-1.8.8/include/parted/Makefile.am
|
||||
--- parted-1.8.8/include/parted/Makefile.am.noinst 2007-08-09 05:20:33.000000000 -1000
|
||||
+++ parted-1.8.8/include/parted/Makefile.am 2007-12-18 12:30:34.000000000 -1000
|
||||
@@ -6,9 +6,7 @@ endif
|
||||
|
||||
partedincludedir = $(includedir)/parted
|
||||
|
||||
-partedinclude_HEADERS = gnu.h \
|
||||
- linux.h \
|
||||
- constraint.h \
|
||||
+partedinclude_HEADERS = constraint.h \
|
||||
debug.h \
|
||||
device.h \
|
||||
disk.h \
|
||||
@@ -18,10 +16,12 @@ partedinclude_HEADERS = gnu.h \
|
||||
natmath.h \
|
||||
timer.h \
|
||||
unit.h \
|
||||
- parted.h \
|
||||
- $(S390_HDRS)
|
||||
+ parted.h
|
||||
|
||||
noinst_HEADERS = crc32.h \
|
||||
- endian.h
|
||||
+ endian.h \
|
||||
+ gnu.h \
|
||||
+ linux.h \
|
||||
+ $(S390_HDRS)
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
@ -1,254 +0,0 @@
|
||||
diff -up parted-1.8.8/libparted/disk.c.check-retval parted-1.8.8/libparted/disk.c
|
||||
--- parted-1.8.8/libparted/disk.c.check-retval 2009-03-23 16:03:15.000000000 +0100
|
||||
+++ parted-1.8.8/libparted/disk.c 2009-03-23 16:10:28.000000000 +0100
|
||||
@@ -50,8 +50,8 @@
|
||||
#ifdef DEBUG
|
||||
static int _disk_check_sanity (PedDisk* disk);
|
||||
#endif
|
||||
-static void _disk_push_update_mode (PedDisk* disk);
|
||||
-static void _disk_pop_update_mode (PedDisk* disk);
|
||||
+static int _disk_push_update_mode (PedDisk* disk);
|
||||
+static int _disk_pop_update_mode (PedDisk* disk);
|
||||
static int _disk_raw_insert_before (PedDisk* disk, PedPartition* loc,
|
||||
PedPartition* part);
|
||||
static int _disk_raw_insert_after (PedDisk* disk, PedPartition* loc,
|
||||
@@ -268,7 +268,8 @@ ped_disk_duplicate (const PedDisk* old_d
|
||||
if (!new_disk)
|
||||
goto error;
|
||||
|
||||
- _disk_push_update_mode (new_disk);
|
||||
+ if (!_disk_push_update_mode (new_disk))
|
||||
+ goto error_destroy_new_disk;
|
||||
for (old_part = ped_disk_next_partition (old_disk, NULL); old_part;
|
||||
old_part = ped_disk_next_partition (old_disk, old_part)) {
|
||||
if (ped_partition_is_active (old_part)) {
|
||||
@@ -276,7 +277,8 @@ ped_disk_duplicate (const PedDisk* old_d
|
||||
goto error_destroy_new_disk;
|
||||
}
|
||||
}
|
||||
- _disk_pop_update_mode (new_disk);
|
||||
+ if(!_disk_pop_update_mode (new_disk))
|
||||
+ goto error_destroy_new_disk;
|
||||
return new_disk;
|
||||
|
||||
error_destroy_new_disk:
|
||||
@@ -364,7 +366,8 @@ ped_disk_new_fresh (PedDevice* dev, cons
|
||||
disk = type->ops->alloc (dev);
|
||||
if (!disk)
|
||||
goto error;
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ goto error_destroy_disk;
|
||||
PED_ASSERT (disk->update_mode == 0, goto error_destroy_disk);
|
||||
|
||||
disk->needs_clobber = 1;
|
||||
@@ -915,12 +918,13 @@ _disk_alloc_freespace (PedDisk* disk)
|
||||
* partitions are removed, making it much easier for various manipulation
|
||||
* routines...
|
||||
*/
|
||||
-static void
|
||||
+static int
|
||||
_disk_push_update_mode (PedDisk* disk)
|
||||
{
|
||||
if (!disk->update_mode) {
|
||||
#ifdef DEBUG
|
||||
- _disk_check_sanity (disk);
|
||||
+ if (!_disk_check_sanity (disk))
|
||||
+ return 0;
|
||||
#endif
|
||||
|
||||
_disk_remove_freespace (disk);
|
||||
@@ -928,24 +932,27 @@ _disk_push_update_mode (PedDisk* disk)
|
||||
_disk_remove_metadata (disk);
|
||||
|
||||
#ifdef DEBUG
|
||||
- _disk_check_sanity (disk);
|
||||
+ if (!_disk_check_sanity (disk))
|
||||
+ return 0;
|
||||
#endif
|
||||
} else {
|
||||
disk->update_mode++;
|
||||
}
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
-static void
|
||||
+static int
|
||||
_disk_pop_update_mode (PedDisk* disk)
|
||||
{
|
||||
- PED_ASSERT (disk->update_mode, return);
|
||||
+ PED_ASSERT (disk->update_mode, return 0);
|
||||
|
||||
if (disk->update_mode == 1) {
|
||||
/* re-allocate metadata BEFORE leaving update mode, to prevent infinite
|
||||
* recursion (metadata allocation requires update mode)
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
- _disk_check_sanity (disk);
|
||||
+ if (!_disk_check_sanity (disk))
|
||||
+ return 0;
|
||||
#endif
|
||||
|
||||
_disk_alloc_metadata (disk);
|
||||
@@ -953,11 +960,13 @@ _disk_pop_update_mode (PedDisk* disk)
|
||||
_disk_alloc_freespace (disk);
|
||||
|
||||
#ifdef DEBUG
|
||||
- _disk_check_sanity (disk);
|
||||
+ if (!_disk_check_sanity (disk))
|
||||
+ return 0;
|
||||
#endif
|
||||
} else {
|
||||
disk->update_mode--;
|
||||
}
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
@@ -1763,7 +1772,8 @@ ped_disk_add_partition (PedDisk* disk, P
|
||||
if (!_partition_check_basic_sanity (disk, part))
|
||||
return 0;
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if (!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
if (ped_partition_is_active (part)) {
|
||||
overlap_constraint
|
||||
@@ -1791,7 +1801,8 @@ ped_disk_add_partition (PedDisk* disk, P
|
||||
|
||||
ped_constraint_destroy (overlap_constraint);
|
||||
ped_constraint_destroy (constraints);
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
#ifdef DEBUG
|
||||
if (!_disk_check_sanity (disk))
|
||||
return 0;
|
||||
@@ -1820,10 +1831,12 @@ ped_disk_remove_partition (PedDisk* disk
|
||||
PED_ASSERT (disk != NULL, return 0);
|
||||
PED_ASSERT (part != NULL, return 0);
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if (!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
PED_ASSERT (part->part_list == NULL, goto error);
|
||||
_disk_raw_remove (disk, part);
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
ped_disk_enumerate_partitions (disk);
|
||||
return 1;
|
||||
|
||||
@@ -1846,12 +1859,14 @@ ped_disk_delete_partition (PedDisk* disk
|
||||
PED_ASSERT (disk != NULL, return 0);
|
||||
PED_ASSERT (part != NULL, return 0);
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if (!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
if (part->type == PED_PARTITION_EXTENDED)
|
||||
ped_disk_delete_all_logical (disk);
|
||||
ped_disk_remove_partition (disk, part);
|
||||
ped_partition_destroy (part);
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1889,7 +1904,8 @@ ped_disk_delete_all (PedDisk* disk)
|
||||
|
||||
PED_ASSERT (disk != NULL, return 0);
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if(!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
for (walk = disk->part_list; walk; walk = next) {
|
||||
next = walk->next;
|
||||
@@ -1898,7 +1914,8 @@ ped_disk_delete_all (PedDisk* disk)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -1932,7 +1949,8 @@ ped_disk_set_partition_geom (PedDisk* di
|
||||
old_geom = part->geom;
|
||||
ped_geometry_init (&new_geom, part->geom.dev, start, end - start + 1);
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if (!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
overlap_constraint
|
||||
= _partition_get_overlap_constraint (part, &new_geom);
|
||||
@@ -1955,7 +1973,8 @@ ped_disk_set_partition_geom (PedDisk* di
|
||||
_disk_raw_remove (disk, part);
|
||||
_disk_raw_add (disk, part);
|
||||
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ goto error;
|
||||
|
||||
ped_constraint_destroy (overlap_constraint);
|
||||
ped_constraint_destroy (constraints);
|
||||
@@ -1963,6 +1982,7 @@ ped_disk_set_partition_geom (PedDisk* di
|
||||
|
||||
error_pop_update_mode:
|
||||
_disk_pop_update_mode (disk);
|
||||
+error:
|
||||
ped_constraint_destroy (overlap_constraint);
|
||||
ped_constraint_destroy (constraints);
|
||||
part->geom = old_geom;
|
||||
@@ -2001,7 +2021,8 @@ ped_disk_maximize_partition (PedDisk* di
|
||||
|
||||
old_geom = part->geom;
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if (!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
if (part->prev)
|
||||
new_start = part->prev->geom.end + 1;
|
||||
@@ -2017,7 +2038,8 @@ ped_disk_maximize_partition (PedDisk* di
|
||||
new_end))
|
||||
goto error;
|
||||
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
return 1;
|
||||
|
||||
error:
|
||||
@@ -2089,11 +2111,13 @@ ped_disk_minimize_extended_partition (Pe
|
||||
if (!ext_part)
|
||||
return 1;
|
||||
|
||||
- _disk_push_update_mode (disk);
|
||||
+ if (!_disk_push_update_mode (disk))
|
||||
+ return 0;
|
||||
|
||||
first_logical = ext_part->part_list;
|
||||
if (!first_logical) {
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
return ped_disk_delete_partition (disk, ext_part);
|
||||
}
|
||||
|
||||
@@ -2106,7 +2130,8 @@ ped_disk_minimize_extended_partition (Pe
|
||||
last_logical->geom.end);
|
||||
ped_constraint_destroy (constraint);
|
||||
|
||||
- _disk_pop_update_mode (disk);
|
||||
+ if (!_disk_pop_update_mode (disk))
|
||||
+ return 0;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- parted-1.8.8/libparted/labels/fdasd.c.orig 2008-08-28 09:07:06.000000000 -0400
|
||||
+++ parted-1.8.8/libparted/labels/fdasd.c 2008-08-28 09:08:28.000000000 -0400
|
||||
@@ -149,7 +149,7 @@ fdasd_error (fdasd_anchor_t *anc, enum f
|
||||
case device_verification_failed:
|
||||
sprintf(error, "fdasd: %s -- %s\n",
|
||||
_("Device verification failed"),
|
||||
- _("The specified device is not a valid DASD device"));,
|
||||
+ _("The specified device is not a valid DASD device"));
|
||||
break;
|
||||
default:
|
||||
sprintf(error, "fdasd: %s: %s\n", _("Fatal error"), str);
|
||||
@@ -780,7 +780,6 @@ fdasd_get_geometry (fdasd_anchor_t *anc,
|
||||
PDEBUG
|
||||
int blksize = 0;
|
||||
dasd_information_t dasd_info;
|
||||
- char s[LINE_LENGTH];
|
||||
|
||||
if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0)
|
||||
fdasd_error(anc, unable_to_ioctl,
|
@ -1,108 +0,0 @@
|
||||
diff -up parted-1.8.8/libparted/labels/sun.c.enableraid parted-1.8.8/libparted/labels/sun.c
|
||||
--- parted-1.8.8/libparted/labels/sun.c.enableraid 2008-12-13 11:52:42.000000000 -0500
|
||||
+++ parted-1.8.8/libparted/labels/sun.c 2008-12-13 11:57:27.000000000 -0500
|
||||
@@ -85,6 +85,7 @@ struct _SunPartitionData {
|
||||
int is_boot;
|
||||
int is_root;
|
||||
int is_lvm;
|
||||
+ int is_raid;
|
||||
};
|
||||
|
||||
struct _SunDiskData {
|
||||
@@ -344,6 +345,7 @@ sun_read (PedDisk* disk)
|
||||
sun_data->is_boot = sun_data->type == 0x1;
|
||||
sun_data->is_root = sun_data->type == 0x2;
|
||||
sun_data->is_lvm = sun_data->type == 0x8e;
|
||||
+ sun_data->is_raid = sun_data->type == 0xfd;
|
||||
|
||||
part->num = i + 1;
|
||||
part->fs_type = ped_file_system_probe (&part->geom);
|
||||
@@ -479,6 +481,7 @@ sun_partition_new (const PedDisk* disk,
|
||||
sun_data->is_boot = 0;
|
||||
sun_data->is_root = 0;
|
||||
sun_data->is_lvm = 0;
|
||||
+ sun_data->is_raid = 0;
|
||||
} else {
|
||||
part->disk_specific = NULL;
|
||||
}
|
||||
@@ -512,6 +515,7 @@ sun_partition_duplicate (const PedPartit
|
||||
new_sun_data->is_boot = old_sun_data->is_boot;
|
||||
new_sun_data->is_root = old_sun_data->is_root;
|
||||
new_sun_data->is_lvm = old_sun_data->is_lvm;
|
||||
+ new_sun_data->is_raid = old_sun_data->is_raid;
|
||||
return new_part;
|
||||
}
|
||||
|
||||
@@ -544,6 +548,10 @@ sun_partition_set_system (PedPartition*
|
||||
sun_data->type = 0x8e;
|
||||
return 1;
|
||||
}
|
||||
+ if (sun_data->is_raid) {
|
||||
+ sun_data->type = 0xfd;
|
||||
+ return 1;
|
||||
+ }
|
||||
|
||||
sun_data->type = 0x83;
|
||||
if (fs_type) {
|
||||
@@ -570,20 +578,38 @@ sun_partition_set_flag (PedPartition* pa
|
||||
switch (flag) {
|
||||
case PED_PARTITION_BOOT:
|
||||
sun_data->is_boot = state;
|
||||
- if (state)
|
||||
- sun_data->is_root = sun_data->is_lvm = 0;
|
||||
+ if (state) {
|
||||
+ sun_data->is_lvm = 0;
|
||||
+ sun_data->is_raid = 0;
|
||||
+ sun_data->is_root = 0;
|
||||
+ }
|
||||
return ped_partition_set_system (part, part->fs_type);
|
||||
|
||||
case PED_PARTITION_ROOT:
|
||||
sun_data->is_root = state;
|
||||
- if (state)
|
||||
- sun_data->is_boot = sun_data->is_lvm = 0;
|
||||
+ if (state) {
|
||||
+ sun_data->is_boot = 0;
|
||||
+ sun_data->is_lvm = 0;
|
||||
+ sun_data->is_raid = 0;
|
||||
+ }
|
||||
return ped_partition_set_system (part, part->fs_type);
|
||||
|
||||
case PED_PARTITION_LVM:
|
||||
sun_data->is_lvm = state;
|
||||
- if (state)
|
||||
- sun_data->is_root = sun_data->is_boot = 0;
|
||||
+ if (state) {
|
||||
+ sun_data->is_boot = 0;
|
||||
+ sun_data->is_raid = 0;
|
||||
+ sun_data->is_root = 0;
|
||||
+ }
|
||||
+ return ped_partition_set_system (part, part->fs_type);
|
||||
+
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ sun_data->is_raid = state;
|
||||
+ if (state) {
|
||||
+ sun_data->is_boot = 0;
|
||||
+ sun_data->is_lvm = 0;
|
||||
+ sun_data->is_root = 0;
|
||||
+ }
|
||||
return ped_partition_set_system (part, part->fs_type);
|
||||
|
||||
default:
|
||||
@@ -609,6 +635,8 @@ sun_partition_get_flag (const PedPartiti
|
||||
return sun_data->is_root;
|
||||
case PED_PARTITION_LVM:
|
||||
return sun_data->is_lvm;
|
||||
+ case PED_PARTITION_RAID:
|
||||
+ return sun_data->is_raid;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
@@ -624,6 +652,7 @@ sun_partition_is_flag_available (const P
|
||||
case PED_PARTITION_BOOT:
|
||||
case PED_PARTITION_ROOT:
|
||||
case PED_PARTITION_LVM:
|
||||
+ case PED_PARTITION_RAID:
|
||||
return 1;
|
||||
|
||||
default:
|
@ -1,98 +0,0 @@
|
||||
diff -ur parted-1.8.8/include/parted/device.h parted-1.8.8-vdX/include/parted/device.h
|
||||
--- parted-1.8.8/include/parted/device.h 2009-03-26 14:33:30.000000000 +0100
|
||||
+++ parted-1.8.8-vdX/include/parted/device.h 2009-03-26 14:52:07.000000000 +0100
|
||||
@@ -46,7 +46,8 @@
|
||||
PED_DEVICE_VIODASD = 10,
|
||||
PED_DEVICE_SX8 = 11,
|
||||
PED_DEVICE_DM = 12,
|
||||
- PED_DEVICE_XVD = 13
|
||||
+ PED_DEVICE_XVD = 13,
|
||||
+ PED_DEVICE_VIRTBLK = 14
|
||||
} PedDeviceType;
|
||||
|
||||
typedef struct _PedDevice PedDevice;
|
||||
diff -ur parted-1.8.8/libparted/arch/linux.c parted-1.8.8-vdX/libparted/arch/linux.c
|
||||
--- parted-1.8.8/libparted/arch/linux.c 2009-03-26 14:33:30.000000000 +0100
|
||||
+++ parted-1.8.8-vdX/libparted/arch/linux.c 2009-03-26 14:57:23.000000000 +0100
|
||||
@@ -299,7 +299,6 @@
|
||||
return (SX8_MAJOR1 <= major && major <= SX8_MAJOR2);
|
||||
}
|
||||
|
||||
-#ifdef ENABLE_DEVICE_MAPPER
|
||||
static int
|
||||
readFD (int fd, char **buf)
|
||||
{
|
||||
@@ -337,7 +336,7 @@
|
||||
}
|
||||
|
||||
static int
|
||||
-_is_dm_major (int major)
|
||||
+_is_major_type (int major, const char* type)
|
||||
{
|
||||
int fd;
|
||||
char* buf = NULL;
|
||||
@@ -371,7 +370,7 @@
|
||||
}
|
||||
|
||||
name = strrchr(line, ' ');
|
||||
- if (!name || strcmp(name+1, "device-mapper"))
|
||||
+ if (!name || strcmp(name+1, type))
|
||||
goto next;
|
||||
|
||||
maj = strtol(line, &name, 10);
|
||||
@@ -392,6 +391,19 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+_is_virtblk_major (int major)
|
||||
+{
|
||||
+ return _is_major_type (major, "virtblk");
|
||||
+}
|
||||
+
|
||||
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
+static int
|
||||
+_is_dm_major (int major)
|
||||
+{
|
||||
+ return _is_major_type (major, "device-mapper");
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
_probe_dm_devices ()
|
||||
{
|
||||
DIR* mapper_dir;
|
||||
@@ -489,6 +501,8 @@
|
||||
} else if (_is_dm_major(dev_major)) {
|
||||
dev->type = PED_DEVICE_DM;
|
||||
#endif
|
||||
+ } else if (_is_virtblk_major(dev_major)) {
|
||||
+ dev->type = PED_DEVICE_VIRTBLK;
|
||||
} else if (dev_major == XVD_MAJOR && (dev_minor % 0x10 == 0)) {
|
||||
dev->type = PED_DEVICE_XVD;
|
||||
} else {
|
||||
@@ -1198,6 +1212,10 @@
|
||||
goto error_free_arch_specific;
|
||||
break;
|
||||
|
||||
+ case PED_DEVICE_VIRTBLK:
|
||||
+ if (!init_generic (dev, _("Virtio Block Device")))
|
||||
+ goto error_free_arch_specific;
|
||||
+ break;
|
||||
case PED_DEVICE_UNKNOWN:
|
||||
if (!init_generic (dev, _("Unknown")))
|
||||
goto error_free_arch_specific;
|
||||
diff -ur parted-1.8.8/parted/parted.c parted-1.8.8-vdX/parted/parted.c
|
||||
--- parted-1.8.8/parted/parted.c 2009-03-26 14:33:30.000000000 +0100
|
||||
+++ parted-1.8.8-vdX/parted/parted.c 2009-03-26 14:53:34.000000000 +0100
|
||||
@@ -1264,10 +1264,10 @@
|
||||
int has_free_arg = 0;
|
||||
int has_list_arg = 0;
|
||||
int has_num_arg = 0;
|
||||
- char* transport[14] = {"unknown", "scsi", "ide", "dac960",
|
||||
+ char* transport[15] = {"unknown", "scsi", "ide", "dac960",
|
||||
"cpqarray", "file", "ataraid", "i2o",
|
||||
"ubd", "dasd", "viodasd", "sx8", "dm",
|
||||
- "xvd"};
|
||||
+ "xvd", "virtblk"};
|
||||
char* peek_word;
|
||||
char* start;
|
||||
char* end;
|
@ -1,16 +0,0 @@
|
||||
diff -up parted-1.8.8/parted/parted.c.xvd parted-1.8.8/parted/parted.c
|
||||
--- parted-1.8.8/parted/parted.c.xvd 2007-08-09 05:20:33.000000000 -1000
|
||||
+++ parted-1.8.8/parted/parted.c 2007-12-18 12:25:16.000000000 -1000
|
||||
@@ -1264,9 +1264,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;
|
Loading…
Reference in New Issue
Block a user