Hello community, here is the log from the commit of package parted checked in at Fri May 19 02:07:10 CEST 2006. -------- --- parted/parted.changes 2006-03-27 12:43:19.000000000 +0200 +++ parted/parted.changes 2006-05-19 01:56:41.000000000 +0200 @@ -2 +2 @@ -Mon Mar 27 12:42:29 CEST 2006 - fehr@suse.de +Thu May 18 12:40:04 CEST 2006 - fehr@suse.de @@ -4,2 +4,25 @@ -- Add patch from Olaf Hering to support raid flag on mac disklabel - (#160084) +- Update to new version 1.7.0 + libparted: + * support for Apple GUIDs to GPT code + * probe /dev/hd? before /dev/sd? + * prefer /sys/block to /proc/partitions where possible + * fix of ext2 "strange layout" bug (EXPERIMENTAL) + * handling of sector sizes not equal to 512 + * added ped_device_get_constraint to support device-dependent constraints + + parted: + * new formatter for "print" command + * SIGSEGV handler + * fixed "rescue" command core dump + * fixes for 'mkpart' and 'mkpartfs' and 'print' + * position and size of partitions are displayed with up to two + digits after the decimal dot (depending on the unit and value) + + manual: + * cut down substantially. + Lots of general content will be moved to the GNU Storage Guide. + +------------------------------------------------------------------- +Tue Apr 25 12:52:33 CEST 2006 - fehr@suse.de + +- Update to new version 1.7.0rc5 Old: ---- fat-resize-verbose.diff format-bug.diff mac_flag_raid.patch parted-1.6.11-conf.patch parted-1.6.11-type.patch parted-1.6.2-mac.patch parted-1.6.25.1.tar.bz2 parted-1.6.3-wipeaix.patch parted-1.6.6-vio.patch parted.diff sgi_dvh_fix.patch New: ---- parted-1.7.0.tar.bz2 parted-mac.patch parted-type.patch parted-vio.patch parted-wipeaix.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ parted.spec ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package parted (Version 1.6.25.1) +# spec file for package parted (Version 1.7.0) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -16,25 +16,19 @@ License: GPL Group: System/Filesystems Summary: GNU partitioner -Version: 1.6.25.1 -Release: 9 +Version: 1.7.0 +Release: 1 Source0: %{name}-%{version}.tar.bz2 -Patch: parted.diff -Patch1: fat-resize-verbose.diff -Patch2: always-resize-part.dif -Patch3: parted-1.6.11-type.patch -Patch4: parted-1.6.2-mac.patch -Patch6: parted-1.6.3-wipeaix.patch -Patch7: parted-1.6.11-conf.patch -Patch8: disable_FAT_check.diff -Patch13: parted-1.6.6-vio.patch -Patch14: etherd_support.diff -Patch15: device_map_support.diff -Patch18: sgi_dvh_fix.patch -Patch19: fat16_hfs_fix.dif -Patch20: always_print_geom.diff -Patch21: format-bug.diff -Patch22: mac_flag_raid.patch +Patch: always-resize-part.dif +Patch1: parted-type.patch +Patch2: parted-mac.patch +Patch3: parted-wipeaix.patch +Patch4: disable_FAT_check.diff +Patch5: parted-vio.patch +Patch6: etherd_support.diff +Patch7: device_map_support.diff +Patch8: fat16_hfs_fix.dif +Patch9: always_print_geom.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build URL: http://www.gnu.org/software/parted/ PreReq: %install_info_prereq @@ -72,21 +66,15 @@ %prep %setup -q %patch -%patch1 -%patch2 +%patch1 -p1 +%patch2 -p1 %patch3 -p1 -%patch4 -p1 -%patch6 -p1 -%patch7 -%patch8 -%patch13 -p1 -%patch14 -p0 -%patch15 -p0 -#%patch18 -p2 -%patch19 -p1 -%patch20 -%patch21 -%patch22 -p1 +%patch4 +%patch5 -p1 +%patch6 -p0 +%patch7 -p0 +%patch8 -p1 +%patch9 %build autoreconf --force --install @@ -127,7 +115,7 @@ %files devel %defattr(-,root,root) -%doc doc/API doc/FAQ doc/FAT +%doc doc/API doc/FAT %{_prefix}/include/* %{aclocaldir}/* %{_libdir}/*.a* @@ -135,9 +123,27 @@ %{_libdir}/*.so %changelog -n parted -* Mon Mar 27 2006 - fehr@suse.de -- Add patch from Olaf Hering to support raid flag on mac disklabel - (#160084) +* Thu May 18 2006 - fehr@suse.de +- Update to new version 1.7.0 + libparted: + * support for Apple GUIDs to GPT code + * probe /dev/hd? before /dev/sd? + * prefer /sys/block to /proc/partitions where possible + * fix of ext2 "strange layout" bug (EXPERIMENTAL) + * handling of sector sizes not equal to 512 + * added ped_device_get_constraint to support device-dependent constraints + parted: + * new formatter for "print" command + * SIGSEGV handler + * fixed "rescue" command core dump + * fixes for 'mkpart' and 'mkpartfs' and 'print' + * position and size of partitions are displayed with up to two + digits after the decimal dot (depending on the unit and value) + manual: + * cut down substantially. + Lots of general content will be moved to the GNU Storage Guide. +* Tue Apr 25 2006 - fehr@suse.de +- Update to new version 1.7.0rc5 * Mon Mar 06 2006 - schwab@suse.de - Fix format string. * Wed Jan 25 2006 - mls@suse.de ++++++ always-resize-part.dif ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -1,34 +1,34 @@ --- parted/parted.c -+++ parted/parted.c 2005/08/15 14:52:44 -@@ -1132,7 +1132,7 @@ ++++ parted/parted.c 2006/03/22 10:06:03 +@@ -1573,7 +1573,7 @@ { - PedDisk *disk; - PedPartition *part = NULL; -- PedFileSystem *fs; -+ PedFileSystem *fs = NULL; - PedConstraint *constraint; - PedSector start, end; - PedGeometry *range_start, *range_end; -@@ -1169,21 +1169,37 @@ - goto error_destroy_constraint; - ped_partition_set_system (part, NULL); - } else { + PedDisk *disk; + PedPartition *part = NULL; +- PedFileSystem *fs; ++ PedFileSystem *fs = NULL; + PedConstraint *constraint; + PedSector start, end; + PedGeometry *range_start = NULL, *range_end = NULL; +@@ -1610,21 +1610,38 @@ + goto error_destroy_constraint; + ped_partition_set_system (part, NULL); + } else { + int always_resize = getenv( "YAST_IS_RUNNING" ) != NULL; + const char* fsname = ""; + if( always_resize ) + { + PedFileSystemType* fst = ped_file_system_probe( &part->geom ); + if( fst ) -+ fsname = fst->name; ++ fsname = fst->name; + } - fs = ped_file_system_open (&part->geom); -- if (!fs) -+ if (!fs && (!always_resize || strncmp(fsname,"fat",3)==0) ) - goto error_destroy_disk; -- constraint = constraint_intersect_and_destroy ( -- ped_file_system_get_resize_constraint (fs), -- constraint_from_start_end ( -- *dev, range_start, range_end)); + fs = ped_file_system_open (&part->geom); +- if (!fs) ++ if (!fs && (!always_resize || strncmp(fsname,"fat",3)==0) ) + goto error_destroy_disk; +- constraint = constraint_intersect_and_destroy ( +- ped_file_system_get_resize_constraint (fs), +- constraint_from_start_end ( +- *dev, range_start, range_end)); + if (fs) + constraint = constraint_intersect_and_destroy ( + ped_file_system_get_resize_constraint (fs), @@ -39,31 +39,32 @@ + new_geom.start = part->geom.start; + constraint = ped_constraint_exact(&new_geom); + } - if (!ped_disk_set_partition_geom (disk, part, constraint, - new_geom.start, new_geom.end)) - goto error_close_fs; -- if (!ped_file_system_resize (fs, &part->geom, timer)) -- goto error_close_fs; -- /* may have changed... eg fat16 -> fat32 */ -- ped_partition_set_system (part, fs->type); -- ped_file_system_close (fs); -+ if(fs) { -+ if (!ped_file_system_resize (fs, &part->geom, timer)) -+ goto error_close_fs; -+ /* may have changed... eg fat16 -> fat32 */ -+ ped_partition_set_system (part, fs->type); -+ ped_file_system_close (fs); -+ } - } + if (!ped_disk_set_partition_geom (disk, part, constraint, + new_geom.start, new_geom.end)) + goto error_close_fs; +- if (!ped_file_system_resize (fs, &part->geom, timer)) +- goto error_close_fs; +- /* may have changed... eg fat16 -> fat32 */ +- ped_partition_set_system (part, fs->type); +- ped_file_system_close (fs); ++ if(fs) ++ { ++ if (!ped_file_system_resize (fs, &part->geom, timer)) ++ goto error_close_fs; ++ /* may have changed... eg fat16 -> fat32 */ ++ ped_partition_set_system (part, fs->type); ++ ped_file_system_close (fs); ++ } + } - ped_geometry_destroy (range_start); -@@ -1194,7 +1203,8 @@ - return 1; + ped_disk_commit (disk); +@@ -1637,7 +1654,8 @@ + return 1; error_close_fs: -- ped_file_system_close (fs); +- ped_file_system_close (fs); + if (fs) -+ ped_file_system_close (fs); ++ ped_file_system_close (fs); error_destroy_constraint: - ped_constraint_destroy (constraint); + ped_constraint_destroy (constraint); error_destroy_disk: ++++++ always_print_geom.diff ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -1,24 +1,24 @@ --- parted/parted.c -+++ parted/parted.c 2005/08/03 15:47:05 -@@ -907,7 +907,21 @@ ++++ parted/parted.c 2006/03/22 11:09:18 +@@ -1231,7 +1231,21 @@ - disk = ped_disk_new (*dev); - if (!disk) + disk = ped_disk_new (*dev); + if (!disk) + { -+ if (ped_unit_get_default () == PED_UNIT_CHS -+ || ped_unit_get_default () == PED_UNIT_CYLINDER) { ++ if (ped_unit_get_default () == PED_UNIT_CHS || ++ ped_unit_get_default () == PED_UNIT_CYLINDER) ++ { + PedCHSGeometry* chs = &(*dev)->bios_geom; + char* cyl_size = ped_unit_format_custom (*dev, + chs->heads * chs->sectors, + PED_UNIT_KILOBYTE); + printf (_("BIOS cylinder,head,sector geometry: %d,%d,%d. " -+ "Each cylinder is %s.\n"), -+ chs->cylinders, chs->heads, chs->sectors, cyl_size); ++ "Each cylinder is %s.\n"), ++ chs->cylinders, chs->heads, chs->sectors, cyl_size); + ped_free (cyl_size); -+ } -+ - goto error; ++ } + goto error; + } - peek_word = command_line_peek_word (); - if (peek_word) { + peek_word = command_line_peek_word (); + if (peek_word) { ++++++ device_map_support.diff ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -8,8 +8,8 @@ } PedDeviceType; typedef struct _PedDevice PedDevice; ---- libparted/linux.c -+++ libparted/linux.c 2004/09/29 10:46:55 +--- libparted/arch/linux.c ++++ libparted/arch/linux.c 2004/09/29 10:46:55 @@ -218,6 +218,7 @@ #define UBD_MAJOR 98 #define VIODASD_MAJOR 112 @@ -18,15 +18,15 @@ #define SCSI_BLK_MAJOR(M) ( \ (M) == SCSI_DISK0_MAJOR \ -@@ -315,6 +316,8 @@ +@@ -330,6 +330,8 @@ dev->type = PED_DEVICE_VIODASD; } else if (dev_major == AOE_MAJOR && (dev_minor % 0x10 == 0)) { dev->type = PED_DEVICE_AOE; + } else if (dev_major == MAPPER_MAJOR) { + dev->type = PED_DEVICE_MAPPER; - } else { - dev->type = PED_DEVICE_FILE; - } + } else { + dev->type = PED_DEVICE_UNKNOWN; + } @@ -828,6 +831,11 @@ goto error_free_dev; break; ++++++ disable_FAT_check.diff ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -1,5 +1,5 @@ ---- libparted/disk_dos.c -+++ libparted/disk_dos.c 2005/01/11 14:39:51 +--- libparted/labels/dos.c ++++ libparted/labels/dos.c 2005/01/11 14:39:51 @@ -170,6 +170,9 @@ if (PED_BE32_TO_CPU (*(unsigned int*)(part_table.boot_code)) == AIXIPLRECID) return 0; ++++++ etherd_support.diff ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -1,17 +1,17 @@ --- include/parted/device.h -+++ include/parted/device.h 2004/09/29 07:45:39 -@@ -35,7 +35,8 @@ - PED_DEVICE_ATARAID = 6, - PED_DEVICE_I2O = 7, - PED_DEVICE_UBD = 8, -- PED_DEVICE_VIODASD = 9 -+ PED_DEVICE_VIODASD = 9, ++++ include/parted/device.h 2006/03/22 10:59:27 +@@ -43,7 +43,8 @@ + PED_DEVICE_ATARAID = 6, + PED_DEVICE_I2O = 7, + PED_DEVICE_UBD = 8, +- PED_DEVICE_VIODASD = 9 ++ PED_DEVICE_VIODASD = 9, + PED_DEVICE_AOE = 10, /* ATA over Ethernet */ } PedDeviceType; typedef struct _PedDevice PedDevice; ---- libparted/linux.c -+++ libparted/linux.c 2004/09/29 07:47:10 +--- libparted/arch/linux.c ++++ libparted/arch/linux.c 2004/09/29 07:47:10 @@ -217,6 +217,7 @@ #define I2O_MAJOR8 87 #define UBD_MAJOR 98 @@ -20,16 +20,16 @@ #define SCSI_BLK_MAJOR(M) ( \ (M) == SCSI_DISK0_MAJOR \ -@@ -312,6 +313,8 @@ - dev->type = PED_DEVICE_UBD; +@@ -327,6 +327,8 @@ + dev->type = PED_DEVICE_UBD; } else if (dev_major == VIODASD_MAJOR && (dev_minor % 0x08 == 0)) { dev->type = PED_DEVICE_VIODASD; + } else if (dev_major == AOE_MAJOR && (dev_minor % 0x10 == 0)) { + dev->type = PED_DEVICE_AOE; - } else { - dev->type = PED_DEVICE_FILE; - } -@@ -815,6 +818,11 @@ + } else { + dev->type = PED_DEVICE_UNKNOWN; + } +@@ -929,6 +931,11 @@ goto error_free_dev; break; @@ -38,6 +38,6 @@ + goto error_free_dev; + break; + - case PED_DEVICE_UBD: - if (!init_generic (dev, _("UBD Driver"))) - goto error_free_dev; + case PED_DEVICE_FILE: + if (!init_file (dev)) + goto error_free_arch_specific; ++++++ fat16_hfs_fix.dif ++++++ --- /var/tmp/diff_new_pack.LZOC29/_old 2006-05-19 02:06:54.000000000 +0200 +++ /var/tmp/diff_new_pack.LZOC29/_new 2006-05-19 02:06:54.000000000 +0200 @@ -1,5 +1,5 @@ ---- parted-1.6.22/libparted/disk_mac.c -+++ parted-1.6.22/libparted/disk_mac.c +--- parted-1.6.22/libparted/labels/mac.c ++++ parted-1.6.22/libparted/labels/mac.c @@ -444,7 +444,7 @@ return _rawpart_cmp_type (raw_part, "Apple_Void"); } @@ -23,8 +23,8 @@ mac_part_data = part->disk_specific; strncpy (mac_part_data->volume_name, raw_part->name, 32); ---- parted-1.6.22/libparted/fs_fat/calc.c -+++ parted-1.6.22/libparted/fs_fat/calc.c +--- parted-1.6.22/libparted/fs/fat/calc.c ++++ parted-1.6.22/libparted/fs/fat/calc.c @@ -26,7 +26,7 @@ fat_min_cluster_size (FatType fat_type) { switch (fat_type) { @@ -52,8 +52,8 @@ case FAT_TYPE_FAT32: return 0xfff0; } ---- parted-1.6.22/libparted/fs_fat/fat.c -+++ parted-1.6.22/libparted/fs_fat/fat.c +--- parted-1.6.22/libparted/fs/fat/fat.c ++++ parted-1.6.22/libparted/fs/fat/fat.c @@ -763,8 +763,8 @@ if (!min_size) return NULL; ++++++ parted-1.6.25.1.tar.bz2 -> parted-1.7.0.tar.bz2 ++++++ ++++ 192696 lines of diff (skipped) ++++++ parted-mac.patch ++++++ --- parted-1.6.2/libparted/disk.c.mac Tue Aug 6 13:13:27 2002 +++ parted-1.6.2/libparted/disk.c Tue Aug 6 13:55:05 2002 @@ -1014,6 +1014,41 @@ return part->disk->type->ops->partition_get_name (part); } +const char* +ped_partition_get_system_name (const PedPartition* part) +{ + PED_ASSERT (part != NULL, return NULL); + PED_ASSERT (part->disk != NULL, return 0); + PED_ASSERT (ped_partition_is_active (part), return 0); + + if (!ped_disk_type_check_feature ( + part->disk->type, PED_DISK_TYPE_SYSTEM_NAME)) + return NULL; /* silent skip */ + + PED_ASSERT (part->disk->type->ops->partition_get_system_name != NULL, + return NULL); + return part->disk->type->ops->partition_get_system_name (part); +} + +int +ped_partition_set_system_name (PedPartition* part, const char* name) +{ + PED_ASSERT (part != NULL, return 0); + PED_ASSERT (part->disk != NULL, return 0); + PED_ASSERT (ped_partition_is_active (part), return 0); + PED_ASSERT (name != NULL, return 0); + + if (!ped_disk_type_check_feature ( + part->disk->type, PED_DISK_TYPE_SYSTEM_NAME)) + return 0; /* silent skip */ + + PED_ASSERT (part->disk->type->ops->partition_set_system_name != NULL, + return 0); + part->disk->type->ops->partition_set_system_name (part, name); + return 1; +} + + PedPartition* ped_disk_extended_partition (const PedDisk* disk) { --- parted-1.6.2/libparted/labels/mac.c.mac Mon Apr 8 12:08:03 2002 +++ parted-1.6.2/libparted/labels/mac.c Tue Aug 6 14:00:09 2002 @@ -1209,6 +1209,36 @@ return mac_data->volume_name; } +/* we do not really want to call this ... yet */ +static void +mac_partition_set_system_name (PedPartition* part, const char* name) +{ + MacPartitionData* mac_data; + int i; + + PED_ASSERT (part != NULL, return); + PED_ASSERT (part->disk_specific != NULL, return); + mac_data = part->disk_specific; + + strncpy (mac_data->system_name, name, 32); + mac_data->system_name [32] = 0; + for (i = strlen (mac_data->system_name) - 1; + mac_data->system_name[i] == ' '; i--) + mac_data->system_name [i] = 0; +} + +static const char* +mac_partition_get_system_name (const PedPartition* part) +{ + MacPartitionData* mac_data; + + PED_ASSERT (part != NULL, return NULL); + PED_ASSERT (part->disk_specific != NULL, return NULL); + mac_data = part->disk_specific; + + return mac_data->system_name; +} + static PedConstraint* _primary_constraint (PedDisk* disk) { @@ -1423,6 +1453,8 @@ partition_is_flag_available: mac_partition_is_flag_available, partition_set_name: mac_partition_set_name, partition_get_name: mac_partition_get_name, + partition_set_system_name: mac_partition_set_system_name, + partition_get_system_name: mac_partition_get_system_name, partition_align: mac_partition_align, partition_enumerate: mac_partition_enumerate, @@ -1435,7 +1467,7 @@ next: NULL, name: "mac", ops: &mac_disk_ops, - features: PED_DISK_TYPE_PARTITION_NAME + features: PED_DISK_TYPE_PARTITION_NAME | PED_DISK_TYPE_SYSTEM_NAME }; void --- parted-1.6.2/include/parted/disk.h.mac Tue Aug 6 13:13:27 2002 +++ parted-1.6.2/include/parted/disk.h Tue Aug 6 13:58:09 2002 @@ -71,10 +71,11 @@ typedef enum { PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ - PED_DISK_TYPE_PARTITION_NAME=2 /**< supports partition names */ + PED_DISK_TYPE_PARTITION_NAME=2, /**< supports partition names */ + PED_DISK_TYPE_SYSTEM_NAME=4 /**< supports system names */ } PedDiskTypeFeature; #define PED_DISK_TYPE_FIRST_FEATURE PED_DISK_TYPE_EXTENDED -#define PED_DISK_TYPE_LAST_FEATURE PED_DISK_TYPE_PARTITION_NAME +#define PED_DISK_TYPE_LAST_FEATURE PED_DISK_TYPE_SYSTEM_NAME /** @} */ @@ -170,6 +171,9 @@ /* other */ int (*alloc_metadata) (PedDisk* disk); int (*get_max_primary_partition_count) (const PedDisk* disk); + + void (*partition_set_system_name) (PedPartition* part, const char* name); + const char* (*partition_get_system_name) (const PedPartition* part); }; struct _PedDiskType { @@ -241,7 +245,9 @@ extern int ped_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type); extern int ped_partition_set_name (PedPartition* part, const char* name); +extern int ped_partition_set_system_name (PedPartition* part, const char* name); extern const char* ped_partition_get_name (const PedPartition* part); +extern const char* ped_partition_get_system_name (const PedPartition* part); extern int ped_partition_is_busy (const PedPartition* part); extern char* ped_partition_get_path (const PedPartition* part); --- parted-1.6.2/parted/parted.c.mac Tue Aug 6 13:13:27 2002 +++ parted-1.6.2/parted/parted.c Tue Aug 6 13:13:27 2002 @@ -1088,6 +1088,7 @@ const char* name; char* res = ped_malloc(1); void* _res = res; + const char* sysname; *res = '\0'; @@ -1125,6 +1126,23 @@ } } + sysname = ped_partition_get_system_name( part ); + if (sysname) { + if (first_flag) + first_flag = 0; + else { + _res = res; + ped_realloc (&_res, strlen (res) + + 1 + 2); + res = _res; + strncat (res, ", ", 2); + } + _res = res; + ped_realloc (&_res, strlen (res) + 6 + strlen(sysname)); + res = _res; + strcat (res, "type="); + strcat (res, sysname); + } return res; } ++++++ parted-type.patch ++++++ --- parted-1.6.11/libparted/disk.c.type Fri May 24 00:32:16 2002 +++ parted-1.6.11/libparted/disk.c Wed Jul 24 13:47:58 2002 @@ -1761,6 +1761,8 @@ return N_("lba"); case PED_PARTITION_HPSERVICE: return N_("hp-service"); + case PED_PARTITION_TYPE: + return N_("type"); case PED_PARTITION_PALO: return N_("palo"); --- parted-1.6.11/libparted/labels/dos.c.type Mon Apr 8 12:07:38 2002 +++ parted-1.6.11/libparted/labels/dos.c Wed Jul 24 13:47:58 2002 @@ -952,6 +952,10 @@ disk = part->disk; switch (flag) { + case PED_PARTITION_TYPE: + dos_data->system = state; + return 1; + case PED_PARTITION_HIDDEN: if (part->type == PED_PARTITION_EXTENDED) { ped_exception_throw ( @@ -1350,6 +1350,9 @@ case PED_PARTITION_LBA: return dos_data->lba; + case PED_PARTITION_TYPE: + return dos_data->system; + case PED_PARTITION_PALO: return dos_data->palo; @@ -1374,6 +1374,7 @@ case PED_PARTITION_RAID: case PED_PARTITION_LVM: case PED_PARTITION_LBA: + case PED_PARTITION_TYPE: case PED_PARTITION_PALO: return 1; --- parted-1.6.2/parted/ui.c.type Wed Jul 3 02:59:11 2002 +++ parted-1.6.2/parted/ui.c Wed Jul 24 13:47:58 2002 @@ -519,7 +519,10 @@ NULL, 1); if (!input) return 0; - valid = sscanf (input, "%d", value); + if (strstr(input, "0x") == input) + valid = sscanf (input, "%x", value); + else + valid = sscanf (input, "%d", value); free (input); return valid; } --- parted-1.6.11/include/parted/disk.h.type Wed Apr 10 03:23:11 2002 +++ parted-1.6.11/include/parted/disk.h Wed Jul 24 13:47:58 2002 @@ -62,8 +62,9 @@ PED_PARTITION_LBA=7, PED_PARTITION_HPSERVICE=8, PED_PARTITION_PALO=9, - PED_PARTITION_PREP=10, - PED_PARTITION_MSFT_RESERVED=11 + PED_PARTITION_TYPE=10, + PED_PARTITION_PREP=11, + PED_PARTITION_MSFT_RESERVED=12 } PedPartitionFlag; #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT #define PED_PARTITION_LAST_FLAG PED_PARTITION_MSFT_RESERVED --- parted-1.6.2/parted/parted.c.type Wed Jul 24 13:47:58 2002 +++ parted-1.6.2/parted/parted.c Wed Jul 24 14:26:45 2002 @@ -1094,17 +1094,28 @@ first_flag = 1; for (flag = ped_partition_flag_next (0); flag; flag = ped_partition_flag_next (flag)) { - if (ped_partition_get_flag (part, flag)) { - if (first_flag) - first_flag = 0; - else { - _res = res; - ped_realloc (&_res, strlen (res) - + 1 + 2); - res = _res; - strncat (res, ", ", 2); - } - + if (first_flag) + first_flag = 0; + else { + _res = res; + ped_realloc (&_res, strlen (res) + + 1 + 2); + res = _res; + strncat (res, ", ", 2); + } + if (flag == PED_PARTITION_TYPE) { + int xtype = ped_partition_get_flag (part, flag); + if (xtype) { + char tmpstr[21]; + int len = snprintf(tmpstr,sizeof(tmpstr)-1,"type=%02x",xtype); + _res = res; + ped_realloc (&_res, strlen (res) + 1 + + ((len>sizeof(tmpstr))?sizeof(tmpstr):len) ); + res = _res; + strncat (res, tmpstr, 21); + } + } + else if (ped_partition_get_flag (part, flag)) { name = _(ped_partition_flag_get_name (flag)); _res = res; ped_realloc (&_res, strlen (res) + 1 @@ -1726,12 +1737,19 @@ goto error_destroy_disk; if (!command_line_get_part_flag (_("Flag to Invert?"), part, &flag)) goto error_destroy_disk; - state = (ped_partition_get_flag (part, flag) == 0 ? 1 : 0); + if( flag == PED_PARTITION_TYPE ) + state = ped_partition_get_flag (part, flag); + else + state = (ped_partition_get_flag (part, flag) == 0 ? 1 : 0); - if (!is_toggle_mode) { + if (!is_toggle_mode && flag != PED_PARTITION_TYPE ) { if (!command_line_get_state (_("New state?"), &state)) goto error_destroy_disk; } + else if( flag == PED_PARTITION_TYPE ) { + if (!command_line_get_integer (_("New type?"), &state)) + goto error_destroy_disk; + } if (!ped_partition_set_flag (part, flag, state)) goto error_destroy_disk; ++++++ parted-vio.patch ++++++ --- parted-1.6.6/libparted/arch/linux.c.vio 2004-03-31 14:45:15.000000000 +0200 +++ parted-1.6.6/libparted/arch/linux.c 2004-03-31 15:36:47.000000000 +0200 @@ -216,6 +216,7 @@ #define I2O_MAJOR7 86 #define I2O_MAJOR8 87 #define UBD_MAJOR 98 +#define VIODASD_MAJOR 112 #define SCSI_BLK_MAJOR(M) ( \ (M) == SCSI_DISK0_MAJOR \ @@ -324,6 +324,8 @@ dev->type = PED_DEVICE_CPQARRAY; } else if (dev_major == UBD_MAJOR && (dev_minor % 0x10 == 0)) { dev->type = PED_DEVICE_UBD; + } else if (dev_major == VIODASD_MAJOR && (dev_minor % 0x08 == 0)) { + dev->type = PED_DEVICE_VIODASD; } else { dev->type = PED_DEVICE_UNKNOWN; } @@ -921,6 +923,11 @@ goto error_free_dev; break; + case PED_DEVICE_VIODASD: + if (!init_generic (dev, _("VIO DASD Driver"))) + goto error_free_dev; + break; + case PED_DEVICE_FILE: if (!init_file (dev)) goto error_free_arch_specific; --- parted-1.6.6/include/parted/device.h.vio 2004-03-31 14:49:15.000000000 +0200 +++ parted-1.6.6/include/parted/device.h 2004-03-31 15:36:34.000000000 +0200 @@ -42,7 +42,8 @@ PED_DEVICE_FILE = 5, PED_DEVICE_ATARAID = 6, PED_DEVICE_I2O = 7, - PED_DEVICE_UBD = 8 + PED_DEVICE_UBD = 8, + PED_DEVICE_VIODASD = 9 } PedDeviceType; typedef struct _PedDevice PedDevice; ++++++ parted-wipeaix.patch ++++++ --- parted-1.6.3/libparted/labels/dos.c 2002-09-23 14:32:38.000000000 +0000 +++ parted-1.6.3/libparted/labels/dos.c 2002-09-23 14:26:07.000000000 +0000 @@ -51,6 +51,8 @@ #define MSDOS_MAGIC 0xAA55 #define PARTITION_MAGIC_MAGIC 0xf6f6 +#define AIXIPLRECID 0xc9c2d4c1 /* Value is EBCIDIC 'IBMA' */ + #define PARTITION_EMPTY 0x00 #define PARTITION_FAT12 0x01 #define PARTITION_FAT16_SM 0x04 @@ -166,6 +166,10 @@ if (PED_LE16_TO_CPU (part_table.magic) != MSDOS_MAGIC) return 0; + /* Is this an AIX IPL label? Then just go away. */ + if (PED_BE32_TO_CPU (*(unsigned int*)(part_table.boot_code)) == AIXIPLRECID) + return 0; + /* 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. @@ -784,7 +786,10 @@ ped_device_read (disk->dev, &table, 0, 1); - if (!table.boot_code[0]) { + /* either no bootrecord at all, or AIX IPL signature ... */ + if ((!table.boot_code[0]) || + (PED_BE32_TO_CPU (*(unsigned int*)(table.boot_code)) == AIXIPLRECID) + ) { memset (table.boot_code, 0, 512); memcpy (table.boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE)); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de