Hello community, here is the log from the commit of package parted for openSUSE:Factory checked in at 2015-04-27 12:59:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/parted (Old) and /work/SRC/openSUSE:Factory/.parted.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "parted" Changes: -------- --- /work/SRC/openSUSE:Factory/parted/parted.changes 2014-12-09 09:13:17.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.parted.new/parted.changes 2015-04-27 12:59:27.000000000 +0200 @@ -1,0 +2,64 @@ +Wed Feb 11 15:01:56 UTC 2015 - pu...@suse.com + +- Update to parted-3.2; Notable changes: + - Added new partition type flag, esp, to set the type to 0xEF on + MS-DOS. Also aliased to boot on GPT to set the UEFI ESP GUID. + - You can now choose to ignore errors about partitions that + overlap, or are longer than the disk. This allows you to use + parted to repair the problem. + - When attempting to manipulate a mounted partition, parted now + issues a warning that you can choose to ignore, instead of an + error. + - When creating a loop label, it automatically comes with a + partition using the whole disk. + - parted -l no longer lists device-mapper devices other than + dmraid whole disks. + - Added new Linux-specific partition GUID type code + (0FC63DAF-8483-4772-8E79-3D69D8477DE4) for Linux filesystem + data on GPT disks. This type code is now assigned as the + default partition type code for new partitions holding Linux + filesystems. + - Added new "msftdata" flag to identify partitions holding NTFS + or FAT filesystems on GPT disks. This flag corresponds to a + GPT type code of EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 + ("Microsoft Basic Data"). Since Linux filesystem partitions + formerly used this type code, this flag may optionally be set + on Linux partitions to make the partition table type codes + match former configurations in case the new Linux filesystem + type code causes problems with some utility. Note that this + flag cannot be removed from NTFS or FAT partitions within + parted except by setting a competing flag, such as "boot" + (which sets the type code used by EFI System partitions) or + "msftres" (which sets the "Microsoft Reserved" type code). + - Many bugfixes (see /usr/share/doc/packages/parted/NEWS) +- merge parted-fix-cciss-partition-naming.patch, + libparted-fix-mmcblk-partition-name.patch, + fix-dm-partition-name.patch + into libparted-partition-naming.patch +- Add parted-resize-alias-to-resizepart.patch +- Add libparted-avoid-libdevice-mapper-warnings.patch +- drop patches (in upstream): + - fix-error-informing-the-kernel.patch + - Fix-help-text-for-disk_-set-toggle.patch + - libparted-Avoid-dasd-as-default-disk-type-while-probe.patch + - libparted-add-support-for-EAV-DASD-partitions.patch + - libparted-add-support-for-implicit-FBA-DASD-partition.patch + - libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch + - libparted-initialize-dasd-part-type.patch + - libparted-mklabel-to-support-EAV-DASD.patch + - libparted-mklabel-to-support-EDEV-DASD.patch + - parted-Add-Intel-Rapid-Start-Technology-partition.patch + - parted-GPT-add-support-for-PReP-GUID.patch + - parted-btrfs-support.patch + - parted-resize-command.patch +- drop do-not-create-dm-nodes.patch: Not needed anymore since + parted DM handling has been reworked. +- modified more-reliable-informing-the-kernel.patch: No longer + call 'udevadm settle' as it was causing issues. +- add patches from upstream (post-3.2): + - lib-fs-resize-prevent-crash-resizing-FAT16.patch + - libparted-device-mapper-uses-512b-sectors.patch + - parted-dont-crash-in-disk_set-when-disk-label-not-found.patch +- refresh patches + +------------------------------------------------------------------- Old: ---- Fix-help-text-for-disk_-set-toggle.patch do-not-create-dm-nodes.patch fix-dm-partition-name.patch fix-error-informing-the-kernel.patch libparted-Avoid-dasd-as-default-disk-type-while-probe.patch libparted-add-support-for-EAV-DASD-partitions.patch libparted-add-support-for-implicit-FBA-DASD-partition.patch libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch libparted-fix-mmcblk-partition-name.patch libparted-initialize-dasd-part-type.patch libparted-mklabel-to-support-EAV-DASD.patch libparted-mklabel-to-support-EDEV-DASD.patch parted-3.1.tar.xz parted-3.1.tar.xz.sig parted-Add-Intel-Rapid-Start-Technology-partition.patch parted-GPT-add-support-for-PReP-GUID.patch parted-btrfs-support.patch parted-fix-cciss-partition-naming.patch parted-resize-command.patch New: ---- lib-fs-resize-prevent-crash-resizing-FAT16.patch libparted-avoid-libdevice-mapper-warnings.patch libparted-device-mapper-uses-512b-sectors.patch libparted-partition-naming.patch parted-3.2.tar.xz parted-3.2.tar.xz.sig parted-dont-crash-in-disk_set-when-disk-label-not-found.patch parted-resize-alias-to-resizepart.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ parted.spec ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package parted # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: parted -Version: 3.1 +Version: 3.2 Release: 0 Summary: GNU partitioner License: GPL-3.0+ @@ -34,39 +34,26 @@ # Other patches Patch10: hfs_fix.dif Patch11: parted-wipeaix.patch -Patch12: fix-error-informing-the-kernel.patch -#PATCH-FEATURE-SUSE fix-dm-partition-name.patch bnc471440,447591 petr.u...@suse.cz -Patch13: fix-dm-partition-name.patch -Patch14: parted-fix-cciss-partition-naming.patch -Patch15: libparted-fix-mmcblk-partition-name.patch -#PATCH-FEATURE-SUSE do-not-create-dm-nodes.patch bnc#501773 petr.u...@suse.cz -Patch16: do-not-create-dm-nodes.patch +Patch12: libparted-partition-naming.patch #PATCH-FEATURE-SUSE more-reliable-informing-the-kernel.patch bnc#657360 petr.u...@suse.cz -Patch17: more-reliable-informing-the-kernel.patch -Patch19: parted-gpt-mbr-sync.patch -Patch20: libparted-ppc-prepboot-in-syncmbr.patch -Patch21: parted-workaround-windows7-gpt-implementation.patch -Patch22: dummy-bootcode-only-for-x86.patch -Patch23: parted-type.patch -Patch24: parted-mac.patch -Patch25: parted-Add-Intel-Rapid-Start-Technology-partition.patch -Patch26: parted-btrfs-support.patch -Patch27: parted-GPT-add-support-for-PReP-GUID.patch -Patch28: parted-resize-command.patch -Patch29: libparted-dasd-do-not-use-first-tracks.patch -Patch30: libparted-initialize-dasd-part-type.patch -Patch31: libparted-use-BLKRRPART-for-DASD.patch.patch -Patch32: libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch -Patch33: Fix-help-text-for-disk_-set-toggle.patch -Patch34: libparted-allow-bigger-snap-radius-if-cylinders-are-used.patch -Patch35: libparted-add-support-for-implicit-FBA-DASD-partition.patch -Patch36: libparted-add-support-for-EAV-DASD-partitions.patch -Patch37: libparted-mklabel-to-support-EAV-DASD.patch -Patch38: libparted-Avoid-dasd-as-default-disk-type-while-probe.patch -Patch39: libparted-mklabel-to-support-EDEV-DASD.patch -Patch40: libparted-make-BLKRRPART-more-robust.patch -Patch41: libparted-make-sure-not-to-treat-percentages-and-cyls-as-exact.patch -Patch42: libparted-dasd-implicit-partition-disk-flag.patch +Patch13: more-reliable-informing-the-kernel.patch +Patch14: parted-gpt-mbr-sync.patch +Patch15: libparted-ppc-prepboot-in-syncmbr.patch +Patch16: parted-workaround-windows7-gpt-implementation.patch +Patch17: dummy-bootcode-only-for-x86.patch +Patch18: parted-type.patch +Patch19: parted-mac.patch +Patch20: libparted-dasd-do-not-use-first-tracks.patch +Patch21: libparted-use-BLKRRPART-for-DASD.patch.patch +Patch22: libparted-allow-bigger-snap-radius-if-cylinders-are-used.patch +Patch23: libparted-make-BLKRRPART-more-robust.patch +Patch24: libparted-make-sure-not-to-treat-percentages-and-cyls-as-exact.patch +Patch25: libparted-dasd-implicit-partition-disk-flag.patch +Patch26: lib-fs-resize-prevent-crash-resizing-FAT16.patch +Patch27: parted-dont-crash-in-disk_set-when-disk-label-not-found.patch +Patch28: libparted-device-mapper-uses-512b-sectors.patch +Patch29: parted-resize-alias-to-resizepart.patch +Patch30: libparted-avoid-libdevice-mapper-warnings.patch Patch100: parted-fatresize-autoconf.patch Requires: /sbin/udevadm BuildRequires: check-devel @@ -128,6 +115,7 @@ %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 @@ -140,18 +128,6 @@ %patch28 -p1 %patch29 -p1 %patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 -%patch38 -p1 -%patch39 -p1 -%patch40 -p1 -%patch41 -p1 -%patch42 -p1 %patch100 -p1 %build ++++++ dummy-bootcode-only-for-x86.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -2,11 +2,11 @@ libparted/labels/dos.c | 7 +++++++ 1 file changed, 7 insertions(+) -Index: parted-3.1/libparted/labels/dos.c +Index: parted-3.2/libparted/labels/dos.c =================================================================== ---- parted-3.1.orig/libparted/labels/dos.c -+++ parted-3.1/libparted/labels/dos.c -@@ -1260,6 +1260,12 @@ msdos_write (const PedDisk* disk) +--- parted-3.2.orig/libparted/labels/dos.c ++++ parted-3.2/libparted/labels/dos.c +@@ -1285,6 +1285,12 @@ msdos_write (const PedDisk* disk) return 0; DosRawTable *table = (DosRawTable *) s0; @@ -19,7 +19,7 @@ /* either no bootrecord at all, or AIX IPL signature ... */ if ( (!table->boot_code[0]) || ( table->boot_code[0] == (char) 0xc9 && -@@ -1270,6 +1276,7 @@ msdos_write (const PedDisk* disk) +@@ -1295,6 +1301,7 @@ msdos_write (const PedDisk* disk) memset (table->boot_code, 0, 512); memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE)); } ++++++ fatresize-0.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fatresize/fatresize.c new/fatresize/fatresize.c --- old/fatresize/fatresize.c 2014-01-24 13:43:42.000000000 +0100 +++ new/fatresize/fatresize.c 2015-03-25 08:02:50.000000000 +0100 @@ -1,3 +1,4 @@ +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <string.h> ++++++ hfs_fix.dif ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -2,11 +2,11 @@ libparted/labels/mac.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -Index: parted-3.1/libparted/labels/mac.c +Index: parted-3.2/libparted/labels/mac.c =================================================================== ---- parted-3.1.orig/libparted/labels/mac.c -+++ parted-3.1/libparted/labels/mac.c -@@ -468,7 +468,7 @@ _rawpart_is_void (MacRawPartition* raw_p +--- parted-3.2.orig/libparted/labels/mac.c ++++ parted-3.2/libparted/labels/mac.c +@@ -467,7 +467,7 @@ _rawpart_is_void (MacRawPartition* raw_p return _rawpart_cmp_type (raw_part, "Apple_Void"); } @@ -15,7 +15,7 @@ * doesn't represent a partition at all. NOTE: some people make Apple_Free * partitions with MacOS, because they can't select another type. So, if the * name is anything other than "Extra" or "", it is treated as a "real" -@@ -533,6 +533,13 @@ _rawpart_analyse (MacRawPartition* raw_p +@@ -530,6 +530,13 @@ _rawpart_analyse (MacRawPartition* raw_p if (!part) goto error; ++++++ lib-fs-resize-prevent-crash-resizing-FAT16.patch ++++++ >From 1e9e770f4bc7f3d80e09ecd1df58575fad064163 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood <mike.fleetw...@googlemail.com> Date: Sun, 28 Sep 2014 16:15:48 +0100 Subject: [PATCH] lib-fs-resize: Prevent crash resizing FAT16 file systems Resizing FAT16 file system crashes in libparted/fs/r/fat/resize.c create_resize_context() because it was dereferencing NULL pointer fs_info->info_sector to copy the info_sector. Only FAT32 file systems have info_sector populated by fat_open() -> fat_info_sector_read(). FAT12 and FAT16 file systems don't have an info_sector so pointer fs_info->info_sector remains assigned NULL from fat_alloc(). When resizing a FAT file system create_resize_context() was always dereferencing fs_info->info_sector to memory copy the info_sector, hence it crashed for FAT12 and FAT16. Make create_resize_context() only copy the info_sector for FAT32 file systems. Reported by Christian Hesse in https://bugzilla.gnome.org/show_bug.cgi?id=735669 --- NEWS | 4 ++++ libparted/fs/r/fat/resize.c | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) Index: parted-3.2/NEWS =================================================================== --- parted-3.2.orig/NEWS +++ parted-3.2/NEWS @@ -160,6 +160,10 @@ GNU parted NEWS System partitions) or "msftres" (which sets the "Microsoft Reserved" type code). +** Bug Fixes + + libparted-fs-resize: Prevent crash resizing FAT16 file systems. + * Noteworthy changes in release 3.1 (2012-03-02) [stable] Index: parted-3.2/libparted/fs/r/fat/resize.c =================================================================== --- parted-3.2.orig/libparted/fs/r/fat/resize.c +++ parted-3.2/libparted/fs/r/fat/resize.c @@ -668,11 +668,17 @@ create_resize_context (PedFileSystem* fs /* preserve boot code, etc. */ new_fs_info->boot_sector = ped_malloc (new_geom->dev->sector_size); - new_fs_info->info_sector = ped_malloc (new_geom->dev->sector_size); memcpy (new_fs_info->boot_sector, fs_info->boot_sector, new_geom->dev->sector_size); - memcpy (new_fs_info->info_sector, fs_info->info_sector, - new_geom->dev->sector_size); + new_fs_info->info_sector = NULL; + if (fs_info->fat_type == FAT_TYPE_FAT32) + { + PED_ASSERT (fs_info->info_sector != NULL); + new_fs_info->info_sector = + ped_malloc (new_geom->dev->sector_size); + memcpy (new_fs_info->info_sector, fs_info->info_sector, + new_geom->dev->sector_size); + } new_fs_info->logical_sector_size = fs_info->logical_sector_size; new_fs_info->sector_count = new_geom->length; ++++++ libparted-avoid-libdevice-mapper-warnings.patch ++++++ --- libparted/arch/linux.c | 6 ++++++ 1 file changed, 6 insertions(+) Index: parted-3.2/libparted/arch/linux.c =================================================================== --- parted-3.2.orig/libparted/arch/linux.c +++ parted-3.2/libparted/arch/linux.c @@ -2728,6 +2728,12 @@ _dm_remove_partition(PedDisk* disk, int goto err; } close (fd); + /* After we closed the fd, udev starts sniffing it, rendering the device busy for a moment + * This is not fatal since we're going to retry anyway, but produces bogus warnings + * from libdevice-mapper. + * Avoid this by giving udev a moment to release the device + */ + usleep(100000); struct dm_task *task = dm_task_create(DM_DEVICE_REMOVE); if (!task) goto err; ++++++ libparted-dasd-do-not-use-first-tracks.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -2,11 +2,11 @@ libparted/labels/dasd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -Index: parted-3.1/libparted/labels/dasd.c +Index: parted-3.2/libparted/labels/dasd.c =================================================================== ---- parted-3.1.orig/libparted/labels/dasd.c -+++ parted-3.1/libparted/labels/dasd.c -@@ -803,7 +803,8 @@ _primary_constraint (PedDisk* disk) +--- parted-3.2.orig/libparted/labels/dasd.c ++++ parted-3.2/libparted/labels/dasd.c +@@ -844,7 +844,8 @@ _primary_constraint (PedDisk* disk) if (!ped_alignment_init (&end_align, -1, disk->dev->hw_geom.sectors * sector_size)) return NULL; ++++++ libparted-device-mapper-uses-512b-sectors.patch ++++++ >From f98f791e19669b900345dad7d96ea4df974e4596 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" <b...@redhat.com> Date: Wed, 4 Feb 2015 16:46:07 -0800 Subject: [PATCH] libparted: device mapper uses 512b sectors device mapper doesn't use the device's sector size when creating a table. It always uses 512b units. This causes partitions to be created 8x smaller than expected on devices with 4906b sectors. --- NEWS | 4 ++++ libparted/arch/linux.c | 21 +++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) Index: parted-3.2/NEWS =================================================================== --- parted-3.2.orig/NEWS +++ parted-3.2/NEWS @@ -162,6 +162,10 @@ GNU parted NEWS ** Bug Fixes + Use 512b sector size when communicating with device-mapper. Fixes + problems with partitions being created too small on dm devices + with sector sizes > 5121b + Don't crash in the disk_set command when a disk label is not found libparted-fs-resize: Prevent crash resizing FAT16 file systems. Index: parted-3.2/libparted/arch/linux.c =================================================================== --- parted-3.2.orig/libparted/arch/linux.c +++ parted-3.2/libparted/arch/linux.c @@ -2768,6 +2768,12 @@ _dm_get_partition_start_and_length(PedPa if (sscanf (params, "%d:%d %Ld", &major, &minor, start) != 3) goto err; rc = 1; + + /* device-mapper uses 512b units, make sure we return length and start in terms of the device's + * sector size. + */ + *start /= (part->disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT); + *length /= (part->disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT); err: free (path); dm_task_destroy(task); @@ -2815,8 +2821,10 @@ _dm_add_partition (PedDisk* disk, const /* Caution: dm_task_destroy frees dev_name. */ dm_task_destroy (task); task = NULL; + /* device-mapper uses 512b units, not the device's sector size */ if ( ! (params = zasprintf ("%d:%d %lld", arch_specific->major, - arch_specific->minor, part->geom.start))) + arch_specific->minor, + part->geom.start * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT)))) goto err; task = dm_task_create (DM_DEVICE_CREATE); @@ -2826,7 +2834,8 @@ _dm_add_partition (PedDisk* disk, const dm_task_set_name (task, vol_name); if (vol_uuid) dm_task_set_uuid (task, vol_uuid); - dm_task_add_target (task, 0, part->geom.length, + /* device-mapper uses 512b units, not the device's sector size */ + dm_task_add_target (task, 0, part->geom.length * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT), "linear", params); if (!dm_task_set_cookie (task, &cookie, 0)) goto err; @@ -2883,8 +2892,11 @@ _dm_resize_partition (PedDisk* disk, con /* Caution: dm_task_destroy frees dev_name. */ dm_task_destroy (task); task = NULL; + + /* device-mapper uses 512b units, not the device's sector size */ if ( ! (params = zasprintf ("%d:%d %lld", arch_specific->major, - arch_specific->minor, part->geom.start))) + arch_specific->minor, + part->geom.start * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT)))) goto err; task = dm_task_create (DM_DEVICE_RELOAD); @@ -2892,7 +2904,8 @@ _dm_resize_partition (PedDisk* disk, con goto err; dm_task_set_name (task, vol_name); - dm_task_add_target (task, 0, part->geom.length, + /* device-mapper uses 512b units, not the device's sector size */ + dm_task_add_target (task, 0, part->geom.length * (disk->dev->sector_size / PED_SECTOR_SIZE_DEFAULT), "linear", params); if (!dm_task_set_cookie (task, &cookie, 0)) goto err; ++++++ libparted-make-sure-not-to-treat-percentages-and-cyls-as-exact.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -14,15 +14,15 @@ libparted/unit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -Index: parted-3.1/libparted/unit.c +Index: parted-3.2/libparted/unit.c =================================================================== ---- parted-3.1.orig/libparted/unit.c -+++ parted-3.1/libparted/unit.c +--- parted-3.2.orig/libparted/unit.c ++++ parted-3.2/libparted/unit.c @@ -551,7 +551,9 @@ ped_unit_parse_custom (const char* str, do not use 4MiB as the range. Rather, presume that they are specifying precisely the starting or ending number, and treat "4MiB" just as we would treat "4194304B". */ -- if (is_power_of_2 (unit_size)) +- if (is_power_of_2 (unit_size) && unit != PED_UNIT_PERCENT) + if (is_power_of_2 (unit_size) && + unit != PED_UNIT_PERCENT && + unit != PED_UNIT_CYLINDER) ++++++ libparted-partition-naming.patch ++++++ --- libparted/arch/linux.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) Index: parted-3.2/libparted/arch/linux.c =================================================================== --- parted-3.2.orig/libparted/arch/linux.c +++ parted-3.2/libparted/arch/linux.c @@ -2342,11 +2342,17 @@ _device_get_part_path (PedDevice const * result = zasprintf ("%.*s/part%d", (int) (path_len - 5), devpath, num); } else { - char const *p = (dev->type == PED_DEVICE_DAC960 - || dev->type == PED_DEVICE_CPQARRAY + const char *p; + if (dev->type == PED_DEVICE_CPQARRAY || + dev->type == PED_DEVICE_SDMMC) + p = "p"; + else if (dev->type == PED_DEVICE_DM) + p = "-part"; + else + p = (dev->type == PED_DEVICE_DAC960 || dev->type == PED_DEVICE_ATARAID || isdigit (devpath[path_len - 1]) - ? "p" : ""); + ? "_part" : ""); result = zasprintf ("%s%s%d", devpath, p, num); } if (dev->type == PED_DEVICE_DM) @@ -2797,7 +2803,7 @@ _dm_add_partition (PedDisk* disk, const size_t name_len = strlen (dev_name); vol_name = zasprintf ("%s%s%d", dev_name, - isdigit (dev_name[name_len - 1]) ? "p" : "", + isdigit (dev_name[name_len - 1]) ? "-part" : "", part->num); if (vol_name == NULL) goto err; ++++++ libparted-ppc-prepboot-in-syncmbr.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -2,11 +2,11 @@ libparted/labels/gpt.c | 3 +++ 1 file changed, 3 insertions(+) -Index: parted-3.1/libparted/labels/gpt.c +Index: parted-3.2/libparted/labels/gpt.c =================================================================== ---- parted-3.1.orig/libparted/labels/gpt.c -+++ parted-3.1/libparted/labels/gpt.c -@@ -1183,6 +1183,9 @@ _part_to_ostype (PedPartition* part) +--- parted-3.2.orig/libparted/labels/gpt.c ++++ parted-3.2/libparted/labels/gpt.c +@@ -1216,6 +1216,9 @@ _part_to_ostype (PedPartition* part) if (strncmp (part->fs_type->name, "hfs", 3) == 0) return 0xaf; if (strstr (part->fs_type->name, "swap")) return 0x82; } ++++++ libparted-use-BLKRRPART-for-DASD.patch.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -12,12 +12,12 @@ libparted/arch/linux.c | 50 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) -Index: parted-3.1/libparted/arch/linux.c +Index: parted-3.2/libparted/arch/linux.c =================================================================== ---- parted-3.1.orig/libparted/arch/linux.c -+++ parted-3.1/libparted/arch/linux.c -@@ -2898,6 +2898,34 @@ _dm_reread_part_table (PedDisk* disk) - #endif +--- parted-3.2.orig/libparted/arch/linux.c ++++ parted-3.2/libparted/arch/linux.c +@@ -3097,6 +3097,34 @@ _disk_sync_part_table (PedDisk* disk) + } static int +_kernel_reread_part_table (PedDevice* dev) @@ -51,9 +51,9 @@ _have_blkpg () { static int have_blkpg = -1; -@@ -2919,15 +2947,19 @@ linux_disk_commit (PedDisk* disk) - return _dm_reread_part_table (disk); - #endif +@@ -3114,15 +3142,19 @@ static int + linux_disk_commit (PedDisk* disk) + { if (disk->dev->type != PED_DEVICE_FILE) { - - /* We now require BLKPG support. If this assertion fails, ++++++ more-reliable-informing-the-kernel.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -7,42 +7,36 @@ # 1. increase the max sleep time if partition is busy from 1 to 2 seconds # 2. do not inform the kernel when only partition flags change - kernel # does not care about the flags -# 3. call 'udevadm settle' before doing BLKPG_DEL_PARTITION ioctl() --- - libparted/arch/linux.c | 4 +++- + libparted/arch/linux.c | 2 +- parted/parted.c | 28 +++++++++++++++++++++++++++- - 2 files changed, 30 insertions(+), 2 deletions(-) + 2 files changed, 28 insertions(+), 2 deletions(-) -Index: parted-3.1/libparted/arch/linux.c +Index: parted-3.2/libparted/arch/linux.c =================================================================== ---- parted-3.1.orig/libparted/arch/linux.c -+++ parted-3.1/libparted/arch/linux.c -@@ -2585,10 +2585,12 @@ _disk_sync_part_table (PedDisk* disk) - if (!errnums) - goto cleanup; - -+ system("/sbin/udevadm settle --timeout=20"); -+ - /* Attempt to remove each and every partition, retrying for - up to max_sleep_seconds upon any failure due to EBUSY. */ - unsigned int sleep_microseconds = 10000; -- unsigned int max_sleep_seconds = 1; -+ unsigned int max_sleep_seconds = 2; - unsigned int n_sleep = (max_sleep_seconds - * 1000000 / sleep_microseconds); - int i; -Index: parted-3.1/parted/parted.c +--- parted-3.2.orig/libparted/arch/linux.c ++++ parted-3.2/libparted/arch/linux.c +@@ -3011,7 +3011,7 @@ _disk_sync_part_table (PedDisk* disk) + /* Attempt to remove the partition, retrying for + up to max_sleep_seconds upon any failure due to EBUSY. */ + unsigned int sleep_microseconds = 10000; +- unsigned int max_sleep_seconds = 1; ++ unsigned int max_sleep_seconds = 2; + unsigned int n_sleep = (max_sleep_seconds + * 1000000 / sleep_microseconds); + do { +Index: parted-3.2/parted/parted.c =================================================================== ---- parted-3.1.orig/parted/parted.c -+++ parted-3.1/parted/parted.c -@@ -258,6 +258,32 @@ _disk_warn_loss (PedDisk* disk) +--- parted-3.2.orig/parted/parted.c ++++ parted-3.2/parted/parted.c +@@ -266,6 +266,32 @@ _disk_warn_loss (PedDisk* disk) disk->dev->path) == PED_EXCEPTION_YES; } +/* -+ * Copied from ped_disk_commit() but removed the ped_disk_commit_to_os. We use -+ * this function in do_set - BLKPG* ioctls() does not care about the partition -+ * flags anyway. ++ * Copied from ped_disk_commit(), but with removed the call to ++ * ped_disk_commit_to_os(). This is used in do_set() - BLKPG* ioctls() do not ++ * care about the partition flags anyway. + */ +static int +ped_disk_commit_just_to_disk (PedDisk* disk) @@ -68,12 +62,12 @@ /* This function changes "sector" to "new_sector" if the new value lies * within the required range. */ -@@ -1643,7 +1669,7 @@ do_set (PedDevice** dev) +@@ -1735,7 +1761,7 @@ do_set (PedDevice** dev, PedDisk **diskp if (!ped_partition_set_flag (part, flag, state)) - goto error_destroy_disk; -- if (!ped_disk_commit (disk)) -+ if (!ped_disk_commit_just_to_disk (disk)) - goto error_destroy_disk; - ped_disk_destroy (disk); + goto error; +- if (!ped_disk_commit (*diskp)) ++ if (!ped_disk_commit_just_to_disk (*diskp)) + goto error; + if ((*dev)->type != PED_DEVICE_FILE) ++++++ parted-2.4-ncursesw6.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:29.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:29.000000000 +0200 @@ -2,11 +2,11 @@ configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: parted-3.1/configure.ac +Index: parted-3.2/configure.ac =================================================================== ---- parted-3.1.orig/configure.ac -+++ parted-3.1/configure.ac -@@ -164,7 +164,8 @@ AM_CPPFLAGS="$AM_CPPFLAGS -D_REENTRANT" +--- parted-3.2.orig/configure.ac ++++ parted-3.2/configure.ac +@@ -165,7 +165,8 @@ AM_CPPFLAGS="$AM_CPPFLAGS -D_REENTRANT" dnl Check for programs. AC_ISC_POSIX @@ -16,7 +16,7 @@ AC_PROG_GCC_TRADITIONAL AM_PROG_CC_C_O -@@ -371,7 +372,7 @@ dnl Check for termcap +@@ -377,7 +378,7 @@ dnl Check for termcap if test "$with_readline" = yes; then OLD_LIBS="$LIBS" LIBS="" ++++++ parted-3.1.tar.xz -> parted-3.2.tar.xz ++++++ ++++ 139006 lines of diff (skipped) ++++++ parted-dont-crash-in-disk_set-when-disk-label-not-found.patch ++++++ >From 624a8b14af7d358782ecc12627c84da72c28aeff Mon Sep 17 00:00:00 2001 From: Phillip Susi <ps...@ubuntu.com> Date: Tue, 13 Jan 2015 11:05:48 -0500 Subject: [PATCH] parted: don't crash in disk_set when disk label not found Due to a typeo in commit 7eac058 "parted: don't reload partition table on every command", the disk_set command would crash if a disk label was not found. --- NEWS | 2 ++ parted/parted.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) Index: parted-3.2/NEWS =================================================================== --- parted-3.2.orig/NEWS +++ parted-3.2/NEWS @@ -162,6 +162,8 @@ GNU parted NEWS ** Bug Fixes + Don't crash in the disk_set command when a disk label is not found + libparted-fs-resize: Prevent crash resizing FAT16 file systems. Index: parted-3.2/parted/parted.c =================================================================== --- parted-3.2.orig/parted/parted.c +++ parted-3.2/parted/parted.c @@ -1708,7 +1708,7 @@ do_disk_set (PedDevice** dev, PedDisk** if (!*diskp) *diskp = ped_disk_new (*dev); - if (!diskp) + if (!*diskp) goto error; if (!command_line_get_disk_flag (_("Flag to Invert?"), *diskp, &flag)) ++++++ parted-gpt-mbr-sync.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:30.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:30.000000000 +0200 @@ -2,11 +2,11 @@ libparted/labels/gpt.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 236 insertions(+), 4 deletions(-) -Index: parted-3.1/libparted/labels/gpt.c +Index: parted-3.2/libparted/labels/gpt.c =================================================================== ---- parted-3.1.orig/libparted/labels/gpt.c -+++ parted-3.1/libparted/labels/gpt.c -@@ -286,6 +286,7 @@ typedef struct _GPTPartitionData +--- parted-3.2.orig/libparted/labels/gpt.c ++++ parted-3.2/libparted/labels/gpt.c +@@ -305,6 +305,7 @@ typedef struct _GPTPartitionData } GPTPartitionData; static PedDiskType gpt_disk_type; @@ -14,7 +14,7 @@ static inline uint32_t pth_get_size (const PedDevice *dev) -@@ -454,8 +455,50 @@ _pmbr_is_valid (const LegacyMBR_t *mbr) +@@ -473,8 +474,50 @@ _pmbr_is_valid (const LegacyMBR_t *mbr) return 0; } @@ -64,10 +64,10 @@ -gpt_probe (const PedDevice *dev) +_gpt_probe_generic(const PedDevice *dev) { - GuidPartitionTableHeader_t *gpt = NULL; int gpt_sig_found = 0; + @@ -508,6 +551,19 @@ gpt_probe (const PedDevice *dev) - return ok; + return gpt_sig_found; } +static int @@ -86,7 +86,7 @@ static PedDisk * gpt_alloc (const PedDevice *dev) { -@@ -546,6 +602,36 @@ error: +@@ -553,6 +609,36 @@ error: } static PedDisk * @@ -123,7 +123,7 @@ gpt_duplicate (const PedDisk *disk) { PedDisk *new_disk; -@@ -930,7 +1016,7 @@ gpt_read (PedDisk *disk) +@@ -963,7 +1049,7 @@ gpt_read (PedDisk *disk) /* motivation: let the user decide about the pmbr... during ped_disk_probe(), they probably didn't get a choice... */ @@ -132,7 +132,7 @@ goto error; GuidPartitionTableHeader_t *gpt = NULL; -@@ -1087,11 +1173,59 @@ error: +@@ -1120,11 +1206,59 @@ error: return 0; } @@ -193,7 +193,7 @@ /* The UEFI spec is not clear about what to do with the following elements of the Protective MBR (pmbr): BootCode (0-440B), UniqueMBRSignature (440B-444B) and Unknown (444B-446B). -@@ -1105,6 +1239,8 @@ _write_pmbr (PedDevice *dev, bool pmbr_b +@@ -1138,6 +1272,8 @@ _write_pmbr (PedDevice *dev, bool pmbr_b memset (pmbr->PartitionRecord, 0, sizeof pmbr->PartitionRecord); pmbr->Signature = PED_CPU_TO_LE16 (MSDOS_MBR_SIGNATURE); @@ -202,7 +202,7 @@ pmbr->PartitionRecord[0].OSType = EFI_PMBR_OSTYPE_EFI; pmbr->PartitionRecord[0].StartSector = 1; pmbr->PartitionRecord[0].EndHead = 0xFE; -@@ -1117,6 +1253,60 @@ _write_pmbr (PedDevice *dev, bool pmbr_b +@@ -1150,6 +1286,60 @@ _write_pmbr (PedDevice *dev, bool pmbr_b pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (dev->length - 1UL); if (pmbr_boot) pmbr->PartitionRecord[0].BootIndicator = 0x80; @@ -263,7 +263,7 @@ int write_ok = ped_device_write (dev, pmbr, GPT_PMBR_LBA, GPT_PMBR_SECTORS); -@@ -1237,7 +1427,7 @@ gpt_write (const PedDisk *disk) +@@ -1269,7 +1459,7 @@ gpt_write (const PedDisk *disk) ptes_crc = efi_crc32 (ptes, ptes_bytes); /* Write protective MBR */ @@ -272,7 +272,7 @@ goto error_free_ptes; /* Write PTH and PTEs */ -@@ -1857,6 +2047,38 @@ static PedDiskOps gpt_disk_ops = +@@ -2034,6 +2224,38 @@ static PedDiskOps gpt_disk_ops = PT_op_function_initializers (gpt) }; @@ -311,7 +311,7 @@ static PedDiskType gpt_disk_type = { next: NULL, -@@ -1865,16 +2087,26 @@ static PedDiskType gpt_disk_type = +@@ -2042,16 +2264,26 @@ static PedDiskType gpt_disk_type = features: PED_DISK_TYPE_PARTITION_NAME }; ++++++ parted-mac.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:30.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:30.000000000 +0200 @@ -3,13 +3,13 @@ libparted/disk.c | 33 +++++++++++++++++++++++++++++++++ libparted/labels/mac.c | 34 +++++++++++++++++++++++++++++++++- parted/parted.c | 12 ++++++++++++ - 5 files changed, 92 insertions(+), 5 deletions(-) + 4 files changed, 85 insertions(+), 3 deletions(-) -Index: parted-3.1/include/parted/disk.in.h +Index: parted-3.2/include/parted/disk.in.h =================================================================== ---- parted-3.1.orig/include/parted/disk.in.h -+++ parted-3.1/include/parted/disk.in.h -@@ -80,10 +80,11 @@ enum _PedPartitionFlag { +--- parted-3.2.orig/include/parted/disk.in.h ++++ parted-3.2/include/parted/disk.in.h +@@ -83,10 +83,11 @@ enum _PedPartitionFlag { enum _PedDiskTypeFeature { PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ @@ -23,16 +23,16 @@ struct _PedDisk; struct _PedPartition; -@@ -243,6 +244,8 @@ struct _PedDiskOps { +@@ -246,6 +247,8 @@ struct _PedDiskOps { /* 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); ++ void (*partition_set_system_name) (PedPartition* part, const char* name); ++ const char* (*partition_get_system_name) (const PedPartition* part); bool (*get_max_supported_partition_count) (const PedDisk* disk, int* supported); PedAlignment *(*get_partition_alignment)(const PedDisk *disk); -@@ -334,7 +337,9 @@ extern int ped_partition_is_flag_availab +@@ -337,7 +340,9 @@ extern int ped_partition_is_flag_availab extern int ped_partition_set_system (PedPartition* part, const PedFileSystemType* fs_type); extern int ped_partition_set_name (PedPartition* part, const char* name); @@ -42,11 +42,11 @@ extern int ped_partition_is_busy (const PedPartition* part); extern char* ped_partition_get_path (const PedPartition* part); -Index: parted-3.1/libparted/disk.c +Index: parted-3.2/libparted/disk.c =================================================================== ---- parted-3.1.orig/libparted/disk.c -+++ parted-3.1/libparted/disk.c -@@ -1180,6 +1180,39 @@ _disk_pop_update_mode (PedDisk* disk) +--- parted-3.2.orig/libparted/disk.c ++++ parted-3.2/libparted/disk.c +@@ -1184,6 +1184,39 @@ _disk_pop_update_mode (PedDisk* disk) * @{ */ @@ -86,12 +86,12 @@ PedPartition* _ped_partition_alloc (const PedDisk* disk, PedPartitionType type, const PedFileSystemType* fs_type, -Index: parted-3.1/libparted/labels/mac.c +Index: parted-3.2/libparted/labels/mac.c =================================================================== ---- parted-3.1.orig/libparted/labels/mac.c -+++ parted-3.1/libparted/labels/mac.c -@@ -1395,6 +1395,36 @@ mac_get_partition_alignment(const PedDis - return ped_alignment_new(0, sector_size); +--- parted-3.2.orig/libparted/labels/mac.c ++++ parted-3.2/libparted/labels/mac.c +@@ -1393,6 +1393,36 @@ mac_get_partition_alignment(const PedDis + return ped_alignment_new(0, 1); } +/* we do not really want to call this ... yet */ @@ -127,7 +127,7 @@ static PedConstraint* _primary_constraint (PedDisk* disk) { -@@ -1598,6 +1628,8 @@ static PedDiskOps mac_disk_ops = { +@@ -1593,6 +1623,8 @@ static PedDiskOps mac_disk_ops = { partition_set_name: mac_partition_set_name, partition_get_name: mac_partition_get_name, @@ -136,7 +136,7 @@ get_partition_alignment: mac_get_partition_alignment, -@@ -1608,7 +1640,7 @@ static PedDiskType mac_disk_type = { +@@ -1603,7 +1635,7 @@ static PedDiskType mac_disk_type = { next: NULL, name: "mac", ops: &mac_disk_ops, @@ -145,11 +145,11 @@ }; void -Index: parted-3.1/parted/parted.c +Index: parted-3.2/parted/parted.c =================================================================== ---- parted-3.1.orig/parted/parted.c -+++ parted-3.1/parted/parted.c -@@ -889,6 +889,7 @@ static char* +--- parted-3.2.orig/parted/parted.c ++++ parted-3.2/parted/parted.c +@@ -888,6 +888,7 @@ static char* partition_print_flags (PedPartition const *part) { int xtype; @@ -157,7 +157,7 @@ char *res = xstrdup (""); if (!part) return res; -@@ -921,6 +922,17 @@ partition_print_flags (PedPartition cons +@@ -920,6 +921,17 @@ partition_print_flags (PedPartition cons } } ++++++ parted-resize-alias-to-resizepart.patch ++++++ --- parted/parted.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: parted-3.2/parted/parted.c =================================================================== --- parted-3.2.orig/parted/parted.c +++ parted-3.2/parted/parted.c @@ -2055,9 +2055,11 @@ NULL), command_register (commands, command_create ( str_list_create_unique ("resize", _("resize"), NULL), - do_resize, - NULL, - str_list_create (_(N_("The resize command was removed in parted 3.0\n")), NULL), 1)); + do_resizepart, + str_list_create ( +_("resizepart NUMBER END resize partition NUMBER"), +NULL), + str_list_create (_(number_msg), _(end_msg), NULL), 1)); command_register (commands, command_create ( str_list_create_unique ("resizepart", _("resizepart"), NULL), ++++++ parted-type.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:30.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:30.000000000 +0200 @@ -2,33 +2,33 @@ include/parted/disk.in.h | 5 ++- libparted/disk.c | 2 + libparted/labels/dos.c | 8 ++++++ - parted/parted.c | 59 +++++++++++++++++++++++++++++++---------------- + parted/parted.c | 61 ++++++++++++++++++++++++++++++----------------- parted/ui.c | 3 ++ - 6 files changed, 58 insertions(+), 24 deletions(-) + 5 files changed, 56 insertions(+), 23 deletions(-) -Index: parted-3.1/include/parted/disk.in.h +Index: parted-3.2/include/parted/disk.in.h =================================================================== ---- parted-3.1.orig/include/parted/disk.in.h -+++ parted-3.1/include/parted/disk.in.h -@@ -72,10 +72,11 @@ enum _PedPartitionFlag { - PED_PARTITION_BIOS_GRUB=12, - PED_PARTITION_APPLE_TV_RECOVERY=13, - PED_PARTITION_DIAG=14, -- PED_PARTITION_LEGACY_BOOT=15 -+ PED_PARTITION_LEGACY_BOOT=15, -+ PED_PARTITION_TYPE=16 +--- parted-3.2.orig/include/parted/disk.in.h ++++ parted-3.2/include/parted/disk.in.h +@@ -75,10 +75,11 @@ enum _PedPartitionFlag { + PED_PARTITION_LEGACY_BOOT=15, + PED_PARTITION_MSFT_DATA=16, + PED_PARTITION_IRST=17, +- PED_PARTITION_ESP=18 ++ PED_PARTITION_ESP=18, ++ PED_PARTITION_TYPE=19 }; #define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT --#define PED_PARTITION_LAST_FLAG PED_PARTITION_LEGACY_BOOT +-#define PED_PARTITION_LAST_FLAG PED_PARTITION_ESP +#define PED_PARTITION_LAST_FLAG PED_PARTITION_TYPE enum _PedDiskTypeFeature { PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */ -Index: parted-3.1/libparted/disk.c +Index: parted-3.2/libparted/disk.c =================================================================== ---- parted-3.1.orig/libparted/disk.c -+++ parted-3.1/libparted/disk.c -@@ -2427,6 +2427,8 @@ ped_partition_flag_get_name (PedPartitio +--- parted-3.2.orig/libparted/disk.c ++++ parted-3.2/libparted/disk.c +@@ -2388,6 +2388,8 @@ ped_partition_flag_get_name (PedPartitio return N_("lba"); case PED_PARTITION_HPSERVICE: return N_("hp-service"); @@ -37,11 +37,11 @@ case PED_PARTITION_PALO: return N_("palo"); case PED_PARTITION_PREP: -Index: parted-3.1/libparted/labels/dos.c +Index: parted-3.2/libparted/labels/dos.c =================================================================== ---- parted-3.1.orig/libparted/labels/dos.c -+++ parted-3.1/libparted/labels/dos.c -@@ -1509,6 +1509,10 @@ msdos_partition_set_flag (PedPartition* +--- parted-3.2.orig/libparted/labels/dos.c ++++ parted-3.2/libparted/labels/dos.c +@@ -1550,6 +1550,10 @@ msdos_partition_set_flag (PedPartition* disk = part->disk; switch (flag) { @@ -52,7 +52,7 @@ case PED_PARTITION_HIDDEN: if (part->type == PED_PARTITION_EXTENDED) { ped_exception_throw ( -@@ -1604,6 +1608,9 @@ msdos_partition_get_flag (const PedParti +@@ -1657,6 +1661,9 @@ msdos_partition_get_flag (const PedParti case PED_PARTITION_LBA: return dos_data->lba; @@ -62,19 +62,19 @@ case PED_PARTITION_PALO: return dos_data->palo; -@@ -1630,6 +1637,7 @@ msdos_partition_is_flag_available (const +@@ -1689,6 +1696,7 @@ msdos_partition_is_flag_available (const case PED_PARTITION_RAID: case PED_PARTITION_LVM: case PED_PARTITION_LBA: + case PED_PARTITION_TYPE: case PED_PARTITION_PALO: case PED_PARTITION_PREP: - case PED_PARTITION_DIAG: -Index: parted-3.1/parted/parted.c + case PED_PARTITION_IRST: +Index: parted-3.2/parted/parted.c =================================================================== ---- parted-3.1.orig/parted/parted.c -+++ parted-3.1/parted/parted.c -@@ -888,28 +888,40 @@ error: +--- parted-3.2.orig/parted/parted.c ++++ parted-3.2/parted/parted.c +@@ -887,28 +887,40 @@ error: static char* partition_print_flags (PedPartition const *part) { @@ -134,32 +134,33 @@ } static int -@@ -1660,12 +1672,19 @@ do_set (PedDevice** dev) - goto error_destroy_disk; +@@ -1726,12 +1738,19 @@ do_set (PedDevice** dev, PedDisk **diskp + goto error; if (!command_line_get_part_flag (_("Flag to Invert?"), part, &flag)) - goto error_destroy_disk; -+ if( flag == PED_PARTITION_TYPE ) -+ state = ped_partition_get_flag (part, flag); -+ else - state = (ped_partition_get_flag (part, flag) == 0 ? 1 : 0); + goto error; +- 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; + goto error; } -+ else if( flag == PED_PARTITION_TYPE ) { -+ if (!command_line_get_integer (_("New type?"), &state)) -+ goto error_destroy_disk; -+ } ++ else if( flag == PED_PARTITION_TYPE ) { ++ if (!command_line_get_integer (_("New type?"), &state)) ++ goto error; ++ } if (!ped_partition_set_flag (part, flag, state)) - goto error_destroy_disk; -Index: parted-3.1/parted/ui.c + goto error; +Index: parted-3.2/parted/ui.c =================================================================== ---- parted-3.1.orig/parted/ui.c -+++ parted-3.1/parted/ui.c -@@ -917,6 +917,9 @@ command_line_get_integer (const char* pr +--- parted-3.2.orig/parted/ui.c ++++ parted-3.2/parted/ui.c +@@ -913,6 +913,9 @@ command_line_get_integer (const char* pr NULL, 1); if (!input) return 0; ++++++ parted-wipeaix.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:30.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:30.000000000 +0200 @@ -2,11 +2,11 @@ libparted/labels/dos.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -Index: parted-3.1/libparted/labels/dos.c +Index: parted-3.2/libparted/labels/dos.c =================================================================== ---- parted-3.1.orig/libparted/labels/dos.c -+++ parted-3.1/libparted/labels/dos.c -@@ -1260,7 +1260,13 @@ msdos_write (const PedDisk* disk) +--- parted-3.2.orig/libparted/labels/dos.c ++++ parted-3.2/libparted/labels/dos.c +@@ -1285,7 +1285,13 @@ msdos_write (const PedDisk* disk) return 0; DosRawTable *table = (DosRawTable *) s0; ++++++ parted-workaround-windows7-gpt-implementation.patch ++++++ --- /var/tmp/diff_new_pack.AQIcez/_old 2015-04-27 12:59:30.000000000 +0200 +++ /var/tmp/diff_new_pack.AQIcez/_new 2015-04-27 12:59:30.000000000 +0200 @@ -3,11 +3,11 @@ libparted/labels/gpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: parted-3.1/libparted/labels/gpt.c +Index: parted-3.2/libparted/labels/gpt.c =================================================================== ---- parted-3.1.orig/libparted/labels/gpt.c -+++ parted-3.1/libparted/labels/gpt.c -@@ -489,7 +489,7 @@ _has_hybrid_pmbr (const PedDevice *dev) +--- parted-3.2.orig/libparted/labels/gpt.c ++++ parted-3.2/libparted/labels/gpt.c +@@ -508,7 +508,7 @@ _has_hybrid_pmbr (const PedDevice *dev) if ((mbr.PartitionRecord[0].OSType == EFI_PMBR_OSTYPE_EFI) && (mbr.PartitionRecord[0].StartingLBA == PED_CPU_TO_LE32(1)) &&