[packages/parted] - updated to 3.3 - fixed info patch - removed obsolete git patches (except for non-obsolete 0092,010

qboosh qboosh at pld-linux.org
Fri Oct 18 16:35:54 CEST 2019


commit 9b28765b41adee7f466d8888de295eafb54832a0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Oct 18 16:39:19 2019 +0200

    - updated to 3.3
    - fixed info patch
    - removed obsolete git patches (except for non-obsolete 0092,0109)

 0001-tests-Try-several-UTF8-locales.patch          |   45 -
 0002-maint-post-release-administrivia.patch        |   50 -
 0003-libparted-also-link-to-UUID_LIBS.patch        |   26 -
 ...ze-Prevent-crash-resizing-FAT16-file-syst.patch |   69 -
 ...3000-resize-fs.sh-Add-FAT16-resizing-test.patch |   54 -
 ...-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch |   68 -
 0007-tests-Change-minimum-size-to-256MiB.patch     |   27 -
 ...t-crash-in-disk_set-when-disk-label-not-f.patch |   43 -
 ...-a-test-for-device-mapper-partition-sizes.patch |  103 -
 ...libparted-device-mapper-uses-512b-sectors.patch |   93 -
 0011-Update-manpage-NAME-so-whatis-will-work.patch |   24 -
 ...sure-the-extended-partition-length-is-cor.patch |   86 -
 ...LKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch |   33 -
 ...crash-with-name-command-and-no-disklabel-.patch |   29 -
 0015-UI-Avoid-memory-leaks.patch                   |   44 -
 0016-libparted-Fix-memory-leaks.patch              |   61 -
 0017-libparted-Fix-possible-memory-leaks.patch     |   62 -
 ...ibparted-Stop-converting-.-in-sys-path-to.patch |   37 -
 ...se-read-only-when-probing-devices-on-linu.patch |  220 --
 0020-tests-Use-wait_for_dev_to_-functions.patch    |  209 --
 ...try-handling-updated-from-upstream-s390-t.patch |  281 ---
 0022-dasd-enhance-device-probing.patch             |  238 ---
 0023-parted-fix-build-error-on-s390.patch          |  143 --
 ...d.c-Safeguard-against-geometry-misprobing.patch |   48 -
 0025-Add-libparted-fs-resize.pc.patch              |   67 -
 ...-udevadm-settle-to-wait_for_-loop-1260664.patch |  119 --
 0027-tests-Add-wait-to-t9042-1257415.patch         |   31 -
 ...1700-failing-on-a-host-with-a-4k-xfs-file.patch |   56 -
 ...ze-Prevent-crash-resizing-FAT-with-very-d.patch |   33 -
 ...3000-resize-fs.sh-Add-very-deep-directory.patch |   49 -
 ...ET-to-get-device-sector-size-in-_device_p.patch |  101 -
 0032-parted-fix-the-rescue-command.patch           |  106 -
 ...k-geometry-as-basis-for-ext2-sector-sizes.patch |   30 -
 ...d-list-of-filesystems-for-fs-type-1311596.patch |   29 -
 ...lay-details-of-partition-alignment-failur.patch |  145 --
 ...emove-fdasd-geometry-code-from-alloc_meta.patch |   49 -
 ...ted-Fix-probing-AIX-disks-on-other-arches.patch |   56 -
 ...artprobe-Open-the-device-once-for-probing.patch |   43 -
 0039-Cleanup-mkpart-manpage-entry-1183077.patch    |   48 -
 0040-doc-Add-information-about-quoting.patch       |   49 -
 ...asd-correct-the-offset-where-the-first-pa.patch |   54 -
 0042-Add-support-for-NVMe-devices.patch            |  105 -
 ...rove-partition-description-in-parted.texi.patch |   61 -
 ...arted-only-IEC-units-are-treated-as-exact.patch |   82 -
 ...-flags.sh-Query-libparted-for-all-flags-t.patch |  188 --
 ...-flags.sh-Stop-excluding-certain-flags-fr.patch |   47 -
 ...310-flags.sh-Add-test-for-bsd-table-flags.patch |   30 -
 ...ix-to-report-success-when-setting-lvm-fla.patch |   33 -
 ...emove-commented-local-variable-from-bsd_p.patch |   26 -
 ...310-flags.sh-Add-test-for-mac-table-flags.patch |  126 --
 ...310-flags.sh-Add-test-for-dvh-table-flags.patch |   69 -
 ...-flags.sh-Add-tests-for-remaining-table-t.patch |   55 -
 ...ptimal-blocks-to-64-for-scsi_debug-device.patch |   31 -
 ...0-flags.sh-skip-pc98-when-sector-size-512.patch |   25 -
 0055-tests-Stop-timing-t9040-1172675.patch         |   46 -
 ...parted-Fix-starting-CHS-in-protective-MBR.patch |   33 -
 ...-Don-t-warn-if-no-HDIO_GET_IDENTITY-ioctl.patch |   44 -
 ...rted-dasd-unify-vtoc-handling-for-cdl-ldl.patch |  272 ---
 ...d-dasd-update-and-improve-fdasd-functions.patch |  208 --
 0060-libparted-dasd-add-new-fdasd-functions.patch  |  171 --
 ...asd-add-test-cases-for-the-new-fdasd-func.patch |   43 -
 ...libparted-set-swap-flag-on-GPT-partitions.patch |  202 --
 ...-Update-t0220-and-t0280-for-the-swap-flag.patch |   43 -
 ...ed-tests-Move-get_sector_size-to-common.c.patch |   94 -
 ...ed-Add-support-for-atari-partition-tables.patch | 2135 --------------------
 ...ac-copy-partition-type-and-name-correctly.patch |   42 -
 0067-libparted-Fix-MacOS-boot-support.patch        |  122 --
 0068-libparted-Fix-typo-in-hfs-error-message.patch |   27 -
 0069-Fix-crash-when-localized.patch                |   28 -
 0070-Add-support-for-RAM-drives.patch              |  102 -
 ...k-the-name-of-partition-first-when-to-nam.patch |   43 -
 ...emove-unneccesary-information-of-command-.patch |   42 -
 ...dasd-improve-flag-processing-for-DASD-LDL.patch |   47 -
 ...asd-add-an-exception-for-changing-DASD-LD.patch |   38 -
 ...asd-add-test-cases-for-the-new-fdasd-func.patch |  241 ---
 ...meout-for-rmmod-scsi_debug-and-make-it-a-.patch |   41 -
 ...1-rescue-fs-wait-for-the-device-to-appear.patch |   27 -
 ...ix-udev-cookie-leak-in-_dm_resize_partiti.patch |   69 -
 0079-atari.c-Drop-xlocale.h-1476934.patch          |   25 -
 ...arted-labels-link-with-libiconv-if-needed.patch |   51 -
 0081-Add-support-for-NVDIMM-devices.patch          |   84 -
 ...x-Include-sys-sysmacros.h-for-major-macro.patch |   25 -
 0083-Fix-make-check.patch                          |   63 -
 0084-tests-fix-t6100-mdraid-partitions.patch       |   26 -
 ...-disk_set-to-not-crash-when-no-flags-are-.patch |   77 -
 ...w-negative-start-value-when-FS-TYPE-is-no.patch |  122 --
 0087-Fix-resizepart-iec-unit-end-sector.patch      |   32 -
 ...d-Remove-unused-traces-of-dynamic-loading.patch |  238 ---
 0089-Lift-512-byte-restriction-on-fat-resize.patch |   52 -
 0090-Fix-atari-label-false-positives.patch         |   41 -
 ...header-move-and-msdos-overlap-to-work-wit.patch |   87 -
 ...-libparted-Fix-ending-CHS-address-in-PMBR.patch |   29 -
 0094-Fix-the-length-of-several-strncpy-calls.patch |   76 -
 0095-parted.c-Always-free-peek_word.patch          |   35 -
 0096-parted.c-Make-sure-dev_name-is-freed.patch    |   45 -
 ...d-partitions-Use-v0.90-metadata-for-the-t.patch |   29 -
 ...ix-potential-command-line-buffer-overflow.patch |   46 -
 ...dd-support-for-MBR-id-GPT-GUID-and-detect.patch |  379 ----
 ...-udf-to-t1700-probe-fs-and-to-the-manpage.patch |   41 -
 ...t_name-Resolve-conflicting-attributes-con.patch |   34 -
 ...rnings-from-GCC-7-s-Wimplicit-fallthrough.patch |   97 -
 0103-Read-NVMe-model-names-from-sysfs.patch        |   59 -
 ...crash-due-to-improper-partition-number-in.patch |   94 -
 ...rted-fix-wrong-error-label-jump-in-mkpart.patch |   66 -
 ...isk-information-when-commands-fail-in-int.patch |   86 -
 ...ve-PED_ASSERT-from-ped_partition_set_name.patch |   32 -
 ...rt-for-Windows-recovery-partition-WINRE-o.patch |  167 --
 ...gv-in-case-2nd-nilfs2-superblock-magic-ac.patch |   53 -
 ...for-sigsegv-when-false-nilfs2-superblock-.patch |  132 --
 parted-info.patch                                  |   14 +-
 parted.spec                                        |  232 +--
 111 files changed, 16 insertions(+), 10849 deletions(-)
---
diff --git a/parted.spec b/parted.spec
index 9638707..d51ce15 100644
--- a/parted.spec
+++ b/parted.spec
@@ -15,126 +15,16 @@ Summary(pt_BR.UTF-8):	Ferramenta flexível de particionamento
 Summary(ru.UTF-8):	Программа GNU манипуляции дисковыми разделами
 Summary(uk.UTF-8):	Програма GNU маніпуляції дисковими розділами
 Name:		parted
-Version:	3.2
-Release:	6
+Version:	3.3
+Release:	1
 License:	GPL v3+
 Group:		Applications/System
-Source0:	http://ftp.gnu.org/gnu/parted/%{name}-%{version}.tar.xz
-# Source0-md5:	0247b6a7b314f8edeb618159fa95f9cb
+Source0:	https://ftp.gnu.org/gnu/parted/%{name}-%{version}.tar.xz
+# Source0-md5:	090655d05f3c471aa8e15a27536889ec
 # restored from git repository
 Source1:	%{name}.m4
-
-Patch01:	0001-tests-Try-several-UTF8-locales.patch
-Patch02:	0002-maint-post-release-administrivia.patch
-Patch03:	0003-lib%{name}-also-link-to-UUID_LIBS.patch
-Patch04:	0004-lib-fs-resize-Prevent-crash-resizing-FAT16-file-syst.patch
-Patch05:	0005-tests-t3000-resize-fs.sh-Add-FAT16-resizing-test.patch
-Patch06:	0006-tests-t3000-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch
-Patch07:	0007-tests-Change-minimum-size-to-256MiB.patch
-Patch08:	0008-%{name}-don-t-crash-in-disk_set-when-disk-label-not-f.patch
-Patch09:	0009-tests-Add-a-test-for-device-mapper-partition-sizes.patch
-Patch10:	0010-lib%{name}-device-mapper-uses-512b-sectors.patch
-Patch11:	0011-Update-manpage-NAME-so-whatis-will-work.patch
-Patch12:	0012-tests-Make-sure-the-extended-partition-length-is-cor.patch
-Patch13:	0013-lib%{name}-BLKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch
-Patch14:	0014-%{name}-Fix-crash-with-name-command-and-no-disklabel-.patch
-Patch15:	0015-UI-Avoid-memory-leaks.patch
-Patch16:	0016-lib%{name}-Fix-memory-leaks.patch
-Patch17:	0017-lib%{name}-Fix-possible-memory-leaks.patch
-Patch18:	0018-lib%{name}-Stop-converting-.-in-sys-path-to.patch
-Patch19:	0019-lib%{name}-Use-read-only-when-probing-devices-on-linu.patch
-Patch20:	0020-tests-Use-wait_for_dev_to_-functions.patch
-Patch21:	0021-fdasd-geometry-handling-updated-from-upstream-s390-t.patch
-Patch22:	0022-dasd-enhance-device-probing.patch
-Patch23:	0023-%{name}-fix-build-error-on-s390.patch
-Patch24:	0024-fdasd.c-Safeguard-against-geometry-misprobing.patch
-Patch25:	0025-Add-lib%{name}-fs-resize.pc.patch
-Patch26:	0026-tests-Add-udevadm-settle-to-wait_for_-loop-1260664.patch
-Patch27:	0027-tests-Add-wait-to-t9042-1257415.patch
-Patch28:	0028-tests-Fix-t1700-failing-on-a-host-with-a-4k-xfs-file.patch
-Patch29:	0029-lib-fs-resize-Prevent-crash-resizing-FAT-with-very-d.patch
-Patch30:	0030-tests-t3000-resize-fs.sh-Add-very-deep-directory.patch
-Patch31:	0031-Use-BLKSSZGET-to-get-device-sector-size-in-_device_p.patch
-Patch32:	0032-%{name}-fix-the-rescue-command.patch
-Patch33:	0033-Use-disk-geometry-as-basis-for-ext2-sector-sizes.patch
-Patch34:	0034-docs-Add-list-of-filesystems-for-fs-type-1311596.patch
-Patch35:	0035-%{name}-Display-details-of-partition-alignment-failur.patch
-Patch36:	0036-lib%{name}-Remove-fdasd-geometry-code-from-alloc_meta.patch
-Patch37:	0037-lib%{name}-Fix-probing-AIX-disks-on-other-arches.patch
-Patch38:	0038-partprobe-Open-the-device-once-for-probing.patch
-Patch39:	0039-Cleanup-mkpart-manpage-entry-1183077.patch
-Patch40:	0040-doc-Add-information-about-quoting.patch
-Patch41:	0041-lib%{name}-dasd-correct-the-offset-where-the-first-pa.patch
-Patch42:	0042-Add-support-for-NVMe-devices.patch
-Patch43:	0043-docs-Improve-partition-description-in-%{name}.texi.patch
-Patch44:	0044-lib%{name}-only-IEC-units-are-treated-as-exact.patch
-Patch45:	0045-tests-t3310-flags.sh-Query-lib%{name}-for-all-flags-t.patch
-Patch46:	0046-tests-t3310-flags.sh-Stop-excluding-certain-flags-fr.patch
-Patch47:	0047-tests-t3310-flags.sh-Add-test-for-bsd-table-flags.patch
-Patch48:	0048-lib%{name}-Fix-to-report-success-when-setting-lvm-fla.patch
-Patch49:	0049-lib%{name}-Remove-commented-local-variable-from-bsd_p.patch
-Patch50:	0050-tests-t3310-flags.sh-Add-test-for-mac-table-flags.patch
-Patch51:	0051-tests-t3310-flags.sh-Add-test-for-dvh-table-flags.patch
-Patch52:	0052-tests-t3310-flags.sh-Add-tests-for-remaining-table-t.patch
-Patch53:	0053-tests-Set-optimal-blocks-to-64-for-scsi_debug-device.patch
-Patch54:	0054-tests-t3310-flags.sh-skip-pc98-when-sector-size-512.patch
-Patch55:	0055-tests-Stop-timing-t9040-1172675.patch
-Patch56:	0056-lib%{name}-Fix-starting-CHS-in-protective-MBR.patch
-Patch57:	0057-lib%{name}-Don-t-warn-if-no-HDIO_GET_IDENTITY-ioctl.patch
-Patch58:	0058-lib%{name}-dasd-unify-vtoc-handling-for-cdl-ldl.patch
-Patch59:	0059-lib%{name}-dasd-update-and-improve-fdasd-functions.patch
-Patch60:	0060-lib%{name}-dasd-add-new-fdasd-functions.patch
-Patch61:	0061-lib%{name}-dasd-add-test-cases-for-the-new-fdasd-func.patch
-Patch62:	0062-lib%{name}-set-swap-flag-on-GPT-partitions.patch
-Patch63:	0063-tests-Update-t0220-and-t0280-for-the-swap-flag.patch
-Patch64:	0064-lib%{name}-tests-Move-get_sector_size-to-common.c.patch
-Patch65:	0065-lib%{name}-Add-support-for-atari-partition-tables.patch
-Patch66:	0066-mac-copy-partition-type-and-name-correctly.patch
-Patch67:	0067-lib%{name}-Fix-MacOS-boot-support.patch
-Patch68:	0068-lib%{name}-Fix-typo-in-hfs-error-message.patch
-Patch69:	0069-Fix-crash-when-localized.patch
-Patch70:	0070-Add-support-for-RAM-drives.patch
-Patch71:	0071-%{name}-check-the-name-of-partition-first-when-to-nam.patch
-Patch72:	0072-%{name}-ui-remove-unneccesary-information-of-command-.patch
-Patch73:	0073-libpartd-dasd-improve-flag-processing-for-DASD-LDL.patch
-Patch74:	0074-lib%{name}-dasd-add-an-exception-for-changing-DASD-LD.patch
-Patch75:	0075-lib%{name}-dasd-add-test-cases-for-the-new-fdasd-func.patch
-Patch76:	0076-Increase-timeout-for-rmmod-scsi_debug-and-make-it-a-.patch
-Patch77:	0077-tests-t1701-rescue-fs-wait-for-the-device-to-appear.patch
-Patch78:	0078-lib%{name}-Fix-udev-cookie-leak-in-_dm_resize_partiti.patch
-Patch79:	0079-atari.c-Drop-xlocale.h-1476934.patch
-Patch80:	0080-libparted-labels-link-with-libiconv-if-needed.patch
-Patch81:	0081-Add-support-for-NVDIMM-devices.patch
-Patch82:	0082-linux-Include-sys-sysmacros.h-for-major-macro.patch
-Patch83:	0083-Fix-make-check.patch
-Patch84:	0084-tests-fix-t6100-mdraid-partitions.patch
-Patch85:	0085-Fix-set-and-disk_set-to-not-crash-when-no-flags-are-.patch
-Patch86:	0086-mkpart-Allow-negative-start-value-when-FS-TYPE-is-no.patch
-Patch87:	0087-Fix-resizepart-iec-unit-end-sector.patch
-Patch88:	0088-build-Remove-unused-traces-of-dynamic-loading.patch
-Patch89:	0089-Lift-512-byte-restriction-on-fat-resize.patch
-Patch90:	0090-Fix-atari-label-false-positives.patch
-Patch91:	0091-Modify-gpt-header-move-and-msdos-overlap-to-work-wit.patch
 Patch92:	0092-Switch-gpt-header-move-and-msdos-overlap-to-python3.patch
-Patch93:	0093-libparted-Fix-ending-CHS-address-in-PMBR.patch
-Patch94:	0094-Fix-the-length-of-several-strncpy-calls.patch
-Patch95:	0095-parted.c-Always-free-peek_word.patch
-Patch96:	0096-parted.c-Make-sure-dev_name-is-freed.patch
-Patch97:	0097-t6100-mdraid-partitions-Use-v0.90-metadata-for-the-t.patch
-Patch98:	0098-Fix-potential-command-line-buffer-overflow.patch
-Patch99:	0099-libparted-Add-support-for-MBR-id-GPT-GUID-and-detect.patch
-Patch100:	0100-Add-udf-to-t1700-probe-fs-and-to-the-manpage.patch
-Patch101:	0101-ped_unit_get_name-Resolve-conflicting-attributes-con.patch
-Patch102:	0102-Fix-warnings-from-GCC-7-s-Wimplicit-fallthrough.patch
-Patch103:	0103-Read-NVMe-model-names-from-sysfs.patch
-Patch104:	0104-parted-fix-crash-due-to-improper-partition-number-in.patch
-Patch105:	0105-parted-fix-wrong-error-label-jump-in-mkpart.patch
-Patch106:	0106-clean-the-disk-information-when-commands-fail-in-int.patch
-Patch107:	0107-parted-Remove-PED_ASSERT-from-ped_partition_set_name.patch
-Patch108:	0108-Added-support-for-Windows-recovery-partition-WINRE-o.patch
 Patch109:	0109-t6000-dm-Stop-using-private-lvm-root.patch
-Patch110:	0110-Avoid-sigsegv-in-case-2nd-nilfs2-superblock-magic-ac.patch
-Patch111:	0111-Tests-case-for-sigsegv-when-false-nilfs2-superblock-.patch
 
 Patch1001:	%{name}-no_wrap.patch
 Patch1002:	%{name}-BIG_FAT_WARNING.patch
@@ -149,12 +39,15 @@ BuildRequires:	automake >= 1:1.11.6
 BuildRequires:	check >= 0.9.3
 BuildRequires:	device-mapper-devel >= 1.02.02
 BuildRequires:	gettext-tools >= 0.18
+%if %(locale -a | grep -q '^C\.utf8$'; echo $?)
+BuildRequires:	glibc-localedb-all
+%endif
 BuildRequires:	libblkid-devel >= 2.17
 %if %{with selinux}
 BuildRequires:	libselinux-devel
 BuildRequires:	libsepol-devel
 %endif
-BuildRequires:	libtool
+BuildRequires:	libtool >= 2:2
 BuildRequires:	libuuid-devel
 %{?with_static:BuildRequires:	libuuid-static}
 %{?with_readline:BuildRequires:	ncurses-devel >= 5.2}
@@ -262,117 +155,8 @@ Biblioteka statyczna libparted.
 
 %prep
 %setup -q
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch27 -p1
-%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
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
-%patch47 -p1
-%patch48 -p1
-%patch49 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch53 -p1
-%patch54 -p1
-%patch55 -p1
-%patch56 -p1
-%patch57 -p1
-%patch58 -p1
-%patch59 -p1
-%patch60 -p1
-%patch61 -p1
-%patch62 -p1
-%patch63 -p1
-%patch64 -p1
-%patch65 -p1
-%patch66 -p1
-%patch67 -p1
-%patch68 -p1
-%patch69 -p1
-%patch70 -p1
-%patch71 -p1
-%patch72 -p1
-%patch73 -p1
-%patch74 -p1
-%patch75 -p1
-%patch76 -p1
-%patch77 -p1
-%patch78 -p1
-%patch79 -p1
-%patch80 -p1
-%patch81 -p1
-%patch82 -p1
-%patch83 -p1
-%patch84 -p1
-%patch85 -p1
-%patch86 -p1
-%patch87 -p1
-%patch88 -p1
-%patch89 -p1
-%patch90 -p1
-%patch91 -p1
 %patch92 -p1
-%patch93 -p1
-%patch94 -p1
-%patch95 -p1
-%patch96 -p1
-%patch97 -p1
-%patch98 -p1
-%patch99 -p1
-%patch100 -p1
-%patch101 -p1
-%patch102 -p1
-%patch103 -p1
-%patch104 -p1
-%patch105 -p1
-%patch106 -p1
-%patch107 -p1
-%patch108 -p1
 %patch109 -p1
-%patch110 -p1
-%patch111 -p1
 
 %patch1001 -p1
 %patch1002 -p1
diff --git a/0001-tests-Try-several-UTF8-locales.patch b/0001-tests-Try-several-UTF8-locales.patch
deleted file mode 100644
index e19cce2..0000000
--- a/0001-tests-Try-several-UTF8-locales.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From e73c27f435017e22a68383255f15ebaa562dd414 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Wed, 13 Aug 2014 13:40:28 -0700
-Subject: [PATCH] tests: Try several UTF8 locales
-
-Not all distributions (Fedora) have C.UTF-8 so try several (en_US, de_DE,
-fr_FR, es_ES). This may still fail if none exist.
-
-* tests/t0251-gpt-unicode.sh: Test for en_US de_DE fr_FR es_ES
----
- tests/t0251-gpt-unicode.sh | 18 +++++++++++++++++-
- 1 file changed, 17 insertions(+), 1 deletion(-)
-
-diff --git a/tests/t0251-gpt-unicode.sh b/tests/t0251-gpt-unicode.sh
-index c845950..537aaa1 100755
---- a/tests/t0251-gpt-unicode.sh
-+++ b/tests/t0251-gpt-unicode.sh
-@@ -22,7 +22,23 @@ dev=loop-file
- # create zeroed device
- truncate -s 10m $dev || fail=1
- 
--export LC_ALL=C.UTF-8
-+found_locale=no
-+for locale in en_US de_DE fr_FR es_ES
-+do
-+  LC_ALL="$locale.utf8"
-+
-+  # In a UTF-8 locale, the string below prints as 4 characters.
-+  if [ `printf 'foo\341\264\244' | wc -m` -eq 4 ]; then
-+    found_locale=yes
-+    break
-+  fi
-+done
-+
-+if [ "$found_locale" != "yes" ]; then
-+  echo "no valid UTF-8 locale found; skipping" >&2
-+  exit 77
-+fi
-+
- # create gpt label with named partition
- part_name=$(printf 'foo\341\264\244')
- parted -s $dev mklabel gpt mkpart primary ext2 1MiB 2MiB name 1 $part_name > empty 2>&1 || fail=1
--- 
-1.9.3
-
diff --git a/0002-maint-post-release-administrivia.patch b/0002-maint-post-release-administrivia.patch
deleted file mode 100644
index 8d2a23a..0000000
--- a/0002-maint-post-release-administrivia.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From f1cdf08806caf7d71779a5fe67af797c8e3ab09e Mon Sep 17 00:00:00 2001
-From: Phillip Susi <psusi at ubuntu.com>
-Date: Mon, 28 Jul 2014 23:19:51 -0400
-Subject: [PATCH 2/6] maint: post-release administrivia
-
-* NEWS: Add header line for next release.
-* .prev-version: Record previous version.
-* cfg.mk (old_NEWS_hash): Auto-update.
----
- .prev-version | 2 +-
- NEWS          | 3 +++
- cfg.mk        | 2 +-
- 3 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/.prev-version b/.prev-version
-index 8c50098..a3ec5a4 100644
---- a/.prev-version
-+++ b/.prev-version
-@@ -1 +1 @@
--3.1
-+3.2
-diff --git a/NEWS b/NEWS
-index 49c8129..297b0a5 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,5 +1,8 @@
- GNU parted NEWS                                    -*- outline -*-
- 
-+* Noteworthy changes in release ?.? (????-??-??) [?]
-+
-+
- * Noteworthy changes in release 3.2 (2014-07-28) [stable]
- 
- ** New Features
-diff --git a/cfg.mk b/cfg.mk
-index ade72d7..62a02b6 100644
---- a/cfg.mk
-+++ b/cfg.mk
-@@ -43,7 +43,7 @@ local-checks-to-skip = \
- # Now that we have better (check.mk) tests, make this the default.
- export VERBOSE = yes
- 
--old_NEWS_hash = bd453bcf049e292a9677c094d24a29dd
-+old_NEWS_hash = 85f2e93c40425e202491675d97e40166
- 
- include $(srcdir)/dist-check.mk
- 
--- 
-1.9.3
-
diff --git a/0003-libparted-also-link-to-UUID_LIBS.patch b/0003-libparted-also-link-to-UUID_LIBS.patch
deleted file mode 100644
index eb9ab33..0000000
--- a/0003-libparted-also-link-to-UUID_LIBS.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 507d8e8d4c60fa6175d327c4f2dac307dc11ccd6 Mon Sep 17 00:00:00 2001
-From: Heiko Becker <heirecka at exherbo.org>
-Date: Fri, 19 Sep 2014 16:51:34 +0200
-Subject: [PATCH 3/6] libparted: also link to UUID_LIBS
-
-* libparted/Makefile.am (libparted_la_LIBADD): Add UUID_LIBS.
-This fixes building parted with the gold linker.
----
- libparted/Makefile.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libparted/Makefile.am b/libparted/Makefile.am
-index edc5f2e..cb58648 100644
---- a/libparted/Makefile.am
-+++ b/libparted/Makefile.am
-@@ -58,6 +58,7 @@ libparted_la_LIBADD =	\
-   $(DM_LIBS)		\
-   $(SELINUX_LIBS)	\
-   $(LIB_BLKID)		\
-+  $(UUID_LIBS)		\
-   $(INTLLIBS)
- 
- EXTRA_DIST	      = mbr.s
--- 
-1.9.3
-
diff --git a/0004-lib-fs-resize-Prevent-crash-resizing-FAT16-file-syst.patch b/0004-lib-fs-resize-Prevent-crash-resizing-FAT16-file-syst.patch
deleted file mode 100644
index 4f56b35..0000000
--- a/0004-lib-fs-resize-Prevent-crash-resizing-FAT16-file-syst.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 1e9e770f4bc7f3d80e09ecd1df58575fad064163 Mon Sep 17 00:00:00 2001
-From: Mike Fleetwood <mike.fleetwood at googlemail.com>
-Date: Sun, 28 Sep 2014 16:15:48 +0100
-Subject: [PATCH 4/6] 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(-)
-
-diff --git a/NEWS b/NEWS
-index 297b0a5..da7db50 100644
---- a/NEWS
-+++ b/NEWS
-@@ -2,6 +2,10 @@ GNU parted NEWS                                    -*- outline -*-
- 
- * Noteworthy changes in release ?.? (????-??-??) [?]
- 
-+** Bug Fixes
-+
-+  libparted-fs-resize: Prevent crash resizing FAT16 file systems.
-+
- 
- * Noteworthy changes in release 3.2 (2014-07-28) [stable]
- 
-diff --git a/libparted/fs/r/fat/resize.c b/libparted/fs/r/fat/resize.c
-index 919acf0..bfe60a0 100644
---- a/libparted/fs/r/fat/resize.c
-+++ b/libparted/fs/r/fat/resize.c
-@@ -668,11 +668,17 @@ create_resize_context (PedFileSystem* fs, const PedGeometry* new_geom)
- 
- /* 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;
--- 
-1.9.3
-
diff --git a/0005-tests-t3000-resize-fs.sh-Add-FAT16-resizing-test.patch b/0005-tests-t3000-resize-fs.sh-Add-FAT16-resizing-test.patch
deleted file mode 100644
index fccf55f..0000000
--- a/0005-tests-t3000-resize-fs.sh-Add-FAT16-resizing-test.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From d704c4919e7e95c3a2e28f48bb8eeacaf17a7cc8 Mon Sep 17 00:00:00 2001
-From: Mike Fleetwood <mike.fleetwood at googlemail.com>
-Date: Sun, 28 Sep 2014 16:15:49 +0100
-Subject: [PATCH 5/6] tests: t3000-resize-fs.sh: Add FAT16 resizing test
-
-Add FAT16 resizing test so that we don't regress again.
----
- tests/t3000-resize-fs.sh | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
-index 8cab476..9084eb4 100755
---- a/tests/t3000-resize-fs.sh
-+++ b/tests/t3000-resize-fs.sh
-@@ -46,7 +46,7 @@ device_sectors_required=$(echo $default_end | sed 's/s$//')
- # Ensure that $dev is large enough for this test
- test $device_sectors_required -le $dev_n_sectors || fail=1
- 
--for fs_type in hfs+ fat32; do
-+for fs_type in hfs+ fat32 fat16; do
- 
-   # create an empty $fs_type partition, cylinder aligned, size > 256 MB
-   parted -a min -s $dev mkpart p1 $start $default_end > out 2>&1 || fail=1
-@@ -59,6 +59,7 @@ for fs_type in hfs+ fat32; do
-   wait_for_dev_to_appear_ ${dev}1
- 
-   case $fs_type in
-+    fat16) mkfs_cmd='mkfs.vfat -F 16'; fsck='fsck.vfat -v';;
-     fat32) mkfs_cmd='mkfs.vfat -F 32'; fsck='fsck.vfat -v';;
-     hfs*) mkfs_cmd='mkfs.hfs';         fsck=fsck.hfs;;
-     *) error "internal error: unhandled fs type: $fs_type";;
-@@ -70,8 +71,17 @@ for fs_type in hfs+ fat32; do
-   # NOTE: shrinking is the only type of resizing that works.
-   # resize that file system to be one cylinder (8MiB) smaller
-   fs-resize ${dev}1 0 $new_end > out 2>&1 || fail=1
--  # expect no output
--  compare /dev/null out || fail=1
-+
-+  # check for expected output
-+  case $fs_type in
-+    fat16) cat << EOF > exp || framework_failure
-+Information: Would you like to use FAT32?  If you leave your file system as FAT16, then you will have no problems.  If you convert to FAT32, and MS Windows is installed on this partition, then you must re-install the MS Windows boot loader.  If you want to do this, you should consult the Parted manual (or your distribution's manual).  Also, converting to FAT32 will make the file system unreadable by MS DOS, MS Windows 95a, and MS Windows NT.
-+EOF
-+      ;;
-+    fat32) cat /dev/null > exp || framework_failure;;     # expect no output
-+    hfs*)  cat /dev/null > exp || framework_failure;;     # expect no output
-+  esac
-+  compare exp out || fail=1
- 
-   # This is known to segfault with fsck.hfs from
-   # Fedora 16's hfsplus-tools-332.14-12.fc15.x86_64.
--- 
-1.9.3
-
diff --git a/0006-tests-t3000-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch b/0006-tests-t3000-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch
deleted file mode 100644
index f803fbe..0000000
--- a/0006-tests-t3000-resize-fs.sh-Add-requirement-on-mkfs.vfa.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From ac74b830ce518c2228b8ae3fba3f1ece82b49f81 Mon Sep 17 00:00:00 2001
-From: Mike Fleetwood <mike.fleetwood at googlemail.com>
-Date: Sun, 28 Sep 2014 16:15:50 +0100
-Subject: [PATCH 6/6] tests: t3000-resize-fs.sh: Add requirement on mkfs.vfat
-
-Add test skipping requirement on mkfs.vfat for the FAT32 and FAT16 file
-system resizing tests.  This matches existing test skipping requirement
-on mkfs.hfs for the hfs+ file system.
-
-* tests/t3000-resize-fs.sh: Also correct skip_test_ to skip_.
-* tests/t-lib-helpers.sh: Also update message for requirement of hfs.
----
- tests/t-lib-helpers.sh   | 8 +++++++-
- tests/t3000-resize-fs.sh | 5 +++--
- 2 files changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh
-index 4e83a05..c8684bb 100644
---- a/tests/t-lib-helpers.sh
-+++ b/tests/t-lib-helpers.sh
-@@ -20,7 +20,13 @@ require_acl_()
- require_hfs_()
- {
-   mkfs.hfs 2>&1 | grep '^usage:' \
--    || skip_ "This test requires HFS support."
-+    || skip_ "mkfs.hfs: command not found"
-+}
-+
-+require_fat_()
-+{
-+  mkfs.vfat 2>&1 | grep '^Usage:' \
-+    || skip_ "mkfs.vfat: command not found"
- }
- 
- # Skip this test if we're not in SELinux "enforcing" mode.
-diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
-index 9084eb4..a79a307 100755
---- a/tests/t3000-resize-fs.sh
-+++ b/tests/t3000-resize-fs.sh
-@@ -18,7 +18,7 @@
- 
- . "${srcdir=.}/init.sh"; path_prepend_ ../parted .
- require_hfs_
--
-+require_fat_
- require_root_
- require_scsi_debug_module_
- require_512_byte_sector_size_
-@@ -31,7 +31,7 @@ default_end=546147s
- 
- # create memory-backed device
- scsi_debug_setup_ dev_size_mb=550 > dev-name ||
--  skip_test_ 'failed to create scsi_debug device'
-+  skip_ 'failed to create scsi_debug device'
- dev=$(cat dev-name)
- 
- fail=0
-@@ -47,6 +47,7 @@ device_sectors_required=$(echo $default_end | sed 's/s$//')
- test $device_sectors_required -le $dev_n_sectors || fail=1
- 
- for fs_type in hfs+ fat32 fat16; do
-+  echo "fs_type=$fs_type"
- 
-   # create an empty $fs_type partition, cylinder aligned, size > 256 MB
-   parted -a min -s $dev mkpart p1 $start $default_end > out 2>&1 || fail=1
--- 
-1.9.3
-
diff --git a/0007-tests-Change-minimum-size-to-256MiB.patch b/0007-tests-Change-minimum-size-to-256MiB.patch
deleted file mode 100644
index a5be3fa..0000000
--- a/0007-tests-Change-minimum-size-to-256MiB.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 17630fc4d523d9c03af87a6e735599e88a032e2a Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 7 Nov 2014 11:15:55 -0800
-Subject: [PATCH] tests: Change minimum size to 256MiB
-
-btrfs on ppc64 wants 136MiB so expand the minimum temp filesystem size
-for the t1700-probe-fs test.
----
- tests/t1700-probe-fs.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh
-index 574d6fe..94ed9ae 100755
---- a/tests/t1700-probe-fs.sh
-+++ b/tests/t1700-probe-fs.sh
-@@ -21,7 +21,7 @@ require_512_byte_sector_size_
- 
- dev=loop-file
- ss=$sector_size_
--n_sectors=$((257*1024))
-+n_sectors=$((512*1024))
- 
- for type in ext2 ext3 ext4 btrfs xfs nilfs2 ntfs vfat hfsplus; do
- 
--- 
-1.9.3
-
diff --git a/0008-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch b/0008-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch
deleted file mode 100644
index c6aae75..0000000
--- a/0008-parted-don-t-crash-in-disk_set-when-disk-label-not-f.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 624a8b14af7d358782ecc12627c84da72c28aeff Mon Sep 17 00:00:00 2001
-From: Phillip Susi <psusi at ubuntu.com>
-Date: Tue, 13 Jan 2015 11:05:48 -0500
-Subject: [PATCH 08/11] 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(-)
-
-diff --git a/NEWS b/NEWS
-index da7db50..10c9a6e 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,8 @@ GNU parted NEWS                                    -*- outline -*-
- 
- ** 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.
- 
- 
-diff --git a/parted/parted.c b/parted/parted.c
-index f27a035..2678554 100644
---- a/parted/parted.c
-+++ b/parted/parted.c
-@@ -1684,7 +1684,7 @@ do_disk_set (PedDevice** dev, PedDisk** diskp)
- 
-     if (!*diskp)
-             *diskp = ped_disk_new (*dev);
--    if (!diskp)
-+    if (!*diskp)
-         goto error;
- 
-     if (!command_line_get_disk_flag (_("Flag to Invert?"), *diskp, &flag))
--- 
-2.1.0
-
diff --git a/0009-tests-Add-a-test-for-device-mapper-partition-sizes.patch b/0009-tests-Add-a-test-for-device-mapper-partition-sizes.patch
deleted file mode 100644
index 894ffa1..0000000
--- a/0009-tests-Add-a-test-for-device-mapper-partition-sizes.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 8ab27474806687a2af7efb008b80b33615e6eb1d Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Wed, 4 Feb 2015 16:31:00 -0800
-Subject: [PATCH 09/11] tests: Add a test for device-mapper partition sizes
-
-device-mapper uses 512b sector units, not device specific sector sizes.
-This test ensures that the correct partition size is created, no matter
-what the device's sector size is.
----
- tests/Makefile.am              |  1 +
- tests/t6006-dm-512b-sectors.sh | 68 ++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 69 insertions(+)
- create mode 100644 tests/t6006-dm-512b-sectors.sh
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index b726366..ce8391d 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -69,6 +69,7 @@ TESTS = \
-   t6003-dm-hide.sh \
-   t6004-dm-many-partitions.sh \
-   t6005-dm-uuid.sh \
-+  t6006-dm-512b-sectors.sh \
-   t6100-mdraid-partitions.sh \
-   t7000-scripting.sh \
-   t8000-loop.sh \
-diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh
-new file mode 100644
-index 0000000..31abba9
---- /dev/null
-+++ b/tests/t6006-dm-512b-sectors.sh
-@@ -0,0 +1,68 @@
-+#!/bin/sh
-+# device-mapper sector sizes are 512b, make sure partitions are the correct
-+# size when using larger sector sizes and a linear dm table.
-+
-+# Copyright (C) 2015 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+. "${srcdir=.}/init.sh"; path_prepend_ ../parted
-+
-+require_root_
-+require_scsi_debug_module_
-+
-+grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null ||
-+  skip_ 'this system lacks a new-enough libblkid'
-+
-+(dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
-+
-+# Device maps names - should be random to not conflict with existing ones on
-+# the system
-+linear_=plinear-$$test
-+
-+cleanup_fn_() {
-+    i=0
-+    udevadm settle
-+    while [ $i -lt 10 ] ; do
-+      [ -e "/dev/mapper/${linear_}1" ] && dmsetup remove ${linear_}1
-+      sleep .2
-+      [ -e "/dev/mapper/$linear_" ] && dmsetup remove $linear_
-+      sleep .2
-+      [ -e "/dev/mapper/${linear_}1" -o -e "/dev/mapper/$linear_" ] || i=10
-+      i=$((i + 1))
-+    done
-+    udevadm settle
-+}
-+
-+# Create a 500M device
-+ss=$sector_size_
-+scsi_debug_setup_ sector_size=$ss dev_size_mb=500 > dev-name ||
-+  skip_ 'failed to create scsi_debug device'
-+scsi_dev=$(cat dev-name)
-+
-+# Size of device, in 512b units
-+scsi_dev_size=$(blockdev --getsz $scsi_dev) || framework_failure
-+
-+dmsetup create $linear_ --table "0 $scsi_dev_size linear $scsi_dev 0" || framework_failure
-+dev="/dev/mapper/$linear_"
-+
-+# Create msdos partition table with a partition from 1MiB to 100MiB
-+parted -s $dev mklabel msdos mkpart primary ext2 1MiB 101MiB > out 2>&1 || fail=1
-+compare /dev/null out || fail=1
-+
-+# The size of the partition should be 100MiB, or 204800 512b sectors
-+p1_size=$(blockdev --getsz ${dev}1) || framework_failure
-+[ $p1_size == 204800 ] || fail=1
-+
-+Exit $fail
--- 
-2.1.0
-
diff --git a/0010-libparted-device-mapper-uses-512b-sectors.patch b/0010-libparted-device-mapper-uses-512b-sectors.patch
deleted file mode 100644
index 3f91c28..0000000
--- a/0010-libparted-device-mapper-uses-512b-sectors.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From f98f791e19669b900345dad7d96ea4df974e4596 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Wed, 4 Feb 2015 16:46:07 -0800
-Subject: [PATCH 10/11] 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(-)
-
-diff --git a/NEWS b/NEWS
-index 10c9a6e..96135ed 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,10 @@ GNU parted NEWS                                    -*- outline -*-
- 
- ** 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.
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index 0f18904..90ab21d 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -2763,6 +2763,12 @@ _dm_get_partition_start_and_length(PedPartition const *part,
-         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);
-@@ -2810,8 +2816,10 @@ _dm_add_partition (PedDisk* disk, const PedPartition* part)
-         /* 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);
-@@ -2821,7 +2829,8 @@ _dm_add_partition (PedDisk* disk, const PedPartition* part)
-         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;
-@@ -2878,8 +2887,11 @@ _dm_resize_partition (PedDisk* disk, const PedPartition* part)
-         /* 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);
-@@ -2887,7 +2899,8 @@ _dm_resize_partition (PedDisk* disk, const PedPartition* part)
-                 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;
--- 
-2.1.0
-
diff --git a/0011-Update-manpage-NAME-so-whatis-will-work.patch b/0011-Update-manpage-NAME-so-whatis-will-work.patch
deleted file mode 100644
index a4130bc..0000000
--- a/0011-Update-manpage-NAME-so-whatis-will-work.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 098bf9ca4c1ea7955ad683694c64f0201760de60 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 1 Aug 2014 14:48:13 -0700
-Subject: [PATCH 11/11] Update manpage NAME so whatis will work
-
----
- doc/C/parted.8 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/doc/C/parted.8 b/doc/C/parted.8
-index 689011c..5304375 100644
---- a/doc/C/parted.8
-+++ b/doc/C/parted.8
-@@ -1,6 +1,6 @@
- .TH PARTED 8 "2007 March 29" parted "GNU Parted Manual"
- .SH NAME
--GNU Parted \- a partition manipulation program
-+parted \- a partition manipulation program
- .SH SYNOPSIS
- .B parted
- [options] [device [command [options...]...]]
--- 
-2.1.0
-
diff --git a/0012-tests-Make-sure-the-extended-partition-length-is-cor.patch b/0012-tests-Make-sure-the-extended-partition-length-is-cor.patch
deleted file mode 100644
index 39b105a..0000000
--- a/0012-tests-Make-sure-the-extended-partition-length-is-cor.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 822439e4eaa4bb758d9058022154973cd690eca7 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 5 Jun 2015 13:46:29 -0700
-Subject: [PATCH] tests: Make sure the extended partition length is correct
- (#1135493)
-
-parted tells the kernel the wrong length when reporting a resize of an
-extended partition. Make sure the length is 2 for 512b sectors and 1
-sector for larger.
-
-(cherry picked from commit 31b5bfa4cd0b2e2944af22466e7b7d88ad94c4c9)
----
- tests/Makefile.am                     |  1 +
- tests/t2320-dos-extended-noclobber.sh | 48 +++++++++++++++++++++++++++++++++++
- 2 files changed, 49 insertions(+)
- create mode 100644 tests/t2320-dos-extended-noclobber.sh
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index ce8391d..001b9de 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -47,6 +47,7 @@ TESTS = \
-   t2201-pc98-label-recog.sh \
-   t2300-dos-label-extended-bootcode.sh \
-   t2310-dos-extended-2-sector-min-offset.sh \
-+  t2320-dos-extended-noclobber.sh \
-   t2400-dos-hfs-partition-type.sh \
-   t2500-probe-corrupt-hfs.sh \
-   t3000-resize-fs.sh \
-diff --git a/tests/t2320-dos-extended-noclobber.sh b/tests/t2320-dos-extended-noclobber.sh
-new file mode 100644
-index 0000000..6f3dfff
---- /dev/null
-+++ b/tests/t2320-dos-extended-noclobber.sh
-@@ -0,0 +1,48 @@
-+#!/bin/sh
-+# Ensure that the extended partition reports the correct length
-+# after adding another partition.
-+
-+# Copyright (C) 2015 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+. "${srcdir=.}/init.sh"; path_prepend_ ../parted
-+
-+require_root_
-+require_scsi_debug_module_
-+
-+# create memory-backed device
-+ss=$sector_size_
-+scsi_debug_setup_ sector_size=$ss dev_size_mb=10 > dev-name ||
-+  skip_ 'failed to create scsi_debug device'
-+scsi_dev=$(cat dev-name)
-+
-+# Create a DOS label with an extended partition and a primary partition
-+parted -s $scsi_dev mklabel msdos || fail=1
-+parted -s $scsi_dev mkpart extended 1 5 > out 2>&1 || fail=1
-+parted -s $scsi_dev mkpart primary 5 10 > out 2>&1 || fail=1
-+
-+# Make sure the size of the extended partition is correct.
-+# 2 sectors for 512b and 1 sector for larger. /sys/.../size is in
-+# 512b blocks so convert accordingly.
-+dev=${scsi_dev#/dev/}
-+ext_len=$(cat /sys/block/$dev/${dev}1/size)
-+if [ $ss -eq 512 ]; then
-+    expected_len=2
-+else
-+    expected_len=$((ss / 512))
-+fi
-+[ $ext_len -eq $expected_len ] || fail=1
-+
-+Exit $fail
--- 
-2.4.3
-
diff --git a/0013-libparted-BLKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch b/0013-libparted-BLKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch
deleted file mode 100644
index 4a1b90f..0000000
--- a/0013-libparted-BLKPG_RESIZE_PARTITION-uses-bytes-not-sect.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1174a9cca1610611ad5d8cf9f3611e9d4c984fb0 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 5 Jun 2015 14:40:00 -0700
-Subject: [PATCH 13/13] libparted: BLKPG_RESIZE_PARTITION uses bytes, not
- sectors (#1135493)
-
-This results in the extended partition vanishing after adding another
-partition.
-
-Resolves: rhbz#1135493
----
- libparted/arch/linux.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index 90ab21d..e73fe1c 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -2547,7 +2547,10 @@ static int _blkpg_resize_partition (PedDisk* disk, const PedPartition *part)
-                                 if (walk->geom.start == part->geom.start+1)
-                                         linux_part.length = 1;
-                         }
--                } else linux_part.length = 1;
-+                } else {
-+                        linux_part.length = 1;
-+                }
-+                linux_part.length *= disk->dev->sector_size;
-         }
-         else
-                 linux_part.length = part->geom.length * disk->dev->sector_size;
--- 
-2.4.0
-
diff --git a/0014-parted-Fix-crash-with-name-command-and-no-disklabel-.patch b/0014-parted-Fix-crash-with-name-command-and-no-disklabel-.patch
deleted file mode 100644
index 7cb8c0b..0000000
--- a/0014-parted-Fix-crash-with-name-command-and-no-disklabel-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From f5c628dd51c7d77ff939554425159ab6e8aef1c0 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Mon, 13 Jul 2015 16:43:11 -0700
-Subject: [PATCH] parted: Fix crash with name command and no disklabel
- (#1226067)
-
-A typo (the last I think) from commit 7eac058 wasn't properly checking
-the result of ped_disk_new so it could crash if there was no disklabel
-on the device.
----
- parted/parted.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/parted/parted.c b/parted/parted.c
-index 2678554..a9426c4 100644
---- a/parted/parted.c
-+++ b/parted/parted.c
-@@ -860,7 +860,7 @@ do_name (PedDevice** dev, PedDisk** diskp)
- 
-         if (!*diskp)
-                 *diskp = ped_disk_new (*dev);
--        if (!diskp)
-+        if (!*diskp)
-                 goto error;
- 
-         if (!command_line_get_partition (_("Partition number?"), *diskp, &part))
--- 
-2.4.3
-
diff --git a/0015-UI-Avoid-memory-leaks.patch b/0015-UI-Avoid-memory-leaks.patch
deleted file mode 100644
index 91dfda8..0000000
--- a/0015-UI-Avoid-memory-leaks.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 059c9548534bef5b0312ac7089eb60e8596469be Mon Sep 17 00:00:00 2001
-From: Amarnath Valluri <amarnath.valluri at intel.com>
-Date: Fri, 31 Jul 2015 12:12:44 +0300
-Subject: [PATCH 15/18] UI: Avoid memory leaks.
-
-* parted/ui.c(command_line_get_sector): Don't leak input string.
-* parted/ui.c(command_line_prompt_words): Don't leak _def string in
-  opt script mode.
-
-Signed-off-by: Amarnath Valluri <amarnath.valluri at intel.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
-(cherry picked from commit 50dc0862a94a3e6e77d4cfb2af21de117fbb4819)
----
- parted/ui.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/parted/ui.c b/parted/ui.c
-index 7365e7d..505b8ac 100644
---- a/parted/ui.c
-+++ b/parted/ui.c
-@@ -829,8 +829,11 @@ command_line_prompt_words (const char* prompt, const char* def,
-         }
- 
-         if (opt_script_mode) {
--                if (_def)
-+                if (_def) {
-                         command_line_push_line (_def, 0);
-+                        if (_def_needs_free)
-+                                free (_def);
-+                }
-                 return;
-         }
- 
-@@ -938,6 +941,7 @@ command_line_get_sector (const char* prompt, PedDevice* dev, PedSector* value,
-                 if (range) {
-                         *range = ped_geometry_new (dev, *value, 1);
-                         free (def_str);
-+                        free (input);
-                         return *range != NULL;
-                 }
- 
--- 
-2.4.3
-
diff --git a/0016-libparted-Fix-memory-leaks.patch b/0016-libparted-Fix-memory-leaks.patch
deleted file mode 100644
index 23cc36a..0000000
--- a/0016-libparted-Fix-memory-leaks.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From bb1014e4e66c6a113f208d2ede8e484f7b702a9d Mon Sep 17 00:00:00 2001
-From: Amarnath Valluri <amarnath.valluri at intel.com>
-Date: Mon, 3 Aug 2015 11:46:33 +0300
-Subject: [PATCH 16/18] libparted: Fix memory leaks
-
-* libparted/fs/r/hfs/hfs.c(hfsplus_resize): Don't leak embedded_geom
-  when volume resizing failed.
-* libparted/fs/fat/fat.c(fat_create): Don't leake fs in-case of
-  fat_write_clustor failuer.
-* libparted/arch/linux.c(_kernel_get_partition_start_and_length): Don't leak
-  dev_fd file descriptor.
-
-Signed-off-by: Amarnath Valluri <amarnath.valluri at intel.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
-(cherry picked from commit b70ecd7a7ef1f69b0afd5c239681decbf369f5d9)
----
- libparted/arch/linux.c   | 1 +
- libparted/fs/r/fat/fat.c | 2 +-
- libparted/fs/r/hfs/hfs.c | 1 +
- 3 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index 1d4cf17..d33c02d 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -2655,6 +2655,7 @@ _kernel_get_partition_start_and_length(PedPartition const *part,
-                 int dev_fd = open (dev_name, O_RDONLY);
-                 if (dev_fd != -1 && ioctl (dev_fd, HDIO_GETGEO, &geom)) {
-                         *start = geom.start;
-+                        close (dev_fd);
-                         ok = true;
-                 } else {
-                         if (dev_fd != -1)
-diff --git a/libparted/fs/r/fat/fat.c b/libparted/fs/r/fat/fat.c
-index 5aa72d8..4ecf5c5 100644
---- a/libparted/fs/r/fat/fat.c
-+++ b/libparted/fs/r/fat/fat.c
-@@ -305,7 +305,7 @@ fat_create (PedGeometry* geom, FatType fat_type, PedTimer* timer)
- 		memset (fs_info->buffer, 0, fs_info->cluster_size);
- 		if (!fat_write_cluster (fs, fs_info->buffer,
- 					fs_info->root_cluster))
--			return 0;
-+			goto error_free_buffers;
- 	}
- 
- 	fs_info->serial_number = generate_random_uint32 ();
-diff --git a/libparted/fs/r/hfs/hfs.c b/libparted/fs/r/hfs/hfs.c
-index a1c37cc..7109a45 100644
---- a/libparted/fs/r/hfs/hfs.c
-+++ b/libparted/fs/r/hfs/hfs.c
-@@ -985,6 +985,7 @@ hfsplus_resize (PedFileSystem* fs, PedGeometry* geom, PedTimer* timer)
- 	/* Resize the HFS+ volume */
- 	if (!hfsplus_volume_resize (fs, embedded_geom, timer_plus)) {
- 		if (timer_plus != timer) ped_timer_destroy_nested (timer_plus);
-+		if (priv_data->wrapper) ped_geometry_destroy (embedded_geom);
- 		ped_exception_throw (
- 			PED_EXCEPTION_ERROR,
- 			PED_EXCEPTION_CANCEL,
--- 
-2.4.3
-
diff --git a/0017-libparted-Fix-possible-memory-leaks.patch b/0017-libparted-Fix-possible-memory-leaks.patch
deleted file mode 100644
index 525dbd2..0000000
--- a/0017-libparted-Fix-possible-memory-leaks.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From c01a30a6821b243cb0f497b73bb5a7b7465b6aca Mon Sep 17 00:00:00 2001
-From: Amarnath Valluri <amarnath.valluri at intel.com>
-Date: Tue, 4 Aug 2015 13:04:45 +0300
-Subject: [PATCH 17/18] libparted: Fix possible memory leaks
-
-* libparted/fs/r/fat/resize.c(fat_convert_directory): Possible leak
-  of sub_old_dir_trav or sub_new_dir_trav in error case.
-* libparted/fs/r/fat/resize.c(fat_construct_converted_tree ): Possible
-  leak of new_trav_info or old_trav_info in error case.
-
-Signed-off-by: Amarnath Valluri <amarnath.valluri at intel.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
-(cherry picked from commit 4886bad13dd011ff56e1c46ff29e8067778c16fd)
----
- libparted/fs/r/fat/resize.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/libparted/fs/r/fat/resize.c b/libparted/fs/r/fat/resize.c
-index 919acf0..b512576 100644
---- a/libparted/fs/r/fat/resize.c
-+++ b/libparted/fs/r/fat/resize.c
-@@ -177,10 +177,13 @@ fat_convert_directory (FatOpContext* ctx, FatTraverseInfo* old_trav,
- 				&& old_dir_entry->name [0] != '.') {
- 			sub_old_dir_trav
- 			    = fat_traverse_directory (old_trav, old_dir_entry);
-+			if (!sub_old_dir_trav) return 0;
- 			sub_new_dir_trav
- 			    = fat_traverse_directory (new_trav, new_dir_entry);
--			if (!sub_old_dir_trav || !sub_new_dir_trav)
-+			if (!sub_new_dir_trav) {
-+				fat_traverse_complete (sub_old_dir_trav);
- 				return 0;
-+			}
- 
- 			if (!fat_convert_directory (ctx, sub_old_dir_trav,
- 						    sub_new_dir_trav))
-@@ -315,17 +318,21 @@ fat_construct_converted_tree (FatOpContext* ctx)
- 	if (new_fs_info->fat_type == FAT_TYPE_FAT32) {
- 		new_trav_info = fat_traverse_begin (ctx->new_fs,
- 					    new_fs_info->root_cluster, "\\");
-+		if (!new_trav_info) return 0;
- 		old_trav_info = fat_traverse_begin (ctx->old_fs, FAT_ROOT,
- 						    "\\");
- 	} else {
- 		fat_clear_root_dir (ctx->new_fs);
- 		new_trav_info = fat_traverse_begin (ctx->new_fs, FAT_ROOT,
- 						    "\\");
-+		if (!new_trav_info) return 0;
- 		old_trav_info = fat_traverse_begin (ctx->old_fs,
- 					    old_fs_info->root_cluster, "\\");
- 	}
--	if (!new_trav_info || !old_trav_info)
-+	if (!old_trav_info) {
-+		fat_traverse_complete (new_trav_info);
- 		return 0;
-+	}
- 	if (!fat_convert_directory (ctx, old_trav_info, new_trav_info))
- 		return 0;
- 	return 1;
--- 
-2.4.3
-
diff --git a/0018-libparted-Stop-converting-.-in-sys-path-to.patch b/0018-libparted-Stop-converting-.-in-sys-path-to.patch
deleted file mode 100644
index a22738d..0000000
--- a/0018-libparted-Stop-converting-.-in-sys-path-to.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 6dc72201ff5b41c171863e6b8eb069b8f8c479cf Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 7 Aug 2015 13:59:58 -0700
-Subject: [PATCH 18/18] libparted: Stop converting . in sys path to /
-
-In _probe_sys_block it claimed that ! and . are replaced by / in sys
-paths, but according to the kernel code only ! is replaced (for cciss
-devices).
-
-This is now causing problems with libnvdimm devices, the details are
-here:
-
-https://git.kernel.org/cgit/linux/kernel/git/djbw/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
-(cherry picked from commit 579bd6878b07d8387451d36106ccf86d26818b77)
----
- libparted/arch/linux.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index d33c02d..20a7235 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -2235,9 +2235,9 @@ _probe_sys_block ()
- 
- 		strcpy (dev_name, "/dev/");
- 		strcat (dev_name, dirent->d_name);
--		/* in /sys/block, '/'s are replaced with '!' or '.' */
-+		/* in /sys/block, '/'s are replaced with '!' */
- 		for (ptr = dev_name; *ptr != '\0'; ptr++) {
--			if (*ptr == '!' || *ptr == '.')
-+			if (*ptr == '!')
- 				*ptr = '/';
- 		}
- 		_ped_device_probe (dev_name);
--- 
-2.4.3
-
diff --git a/0019-libparted-Use-read-only-when-probing-devices-on-linu.patch b/0019-libparted-Use-read-only-when-probing-devices-on-linu.patch
deleted file mode 100644
index 4b16f26..0000000
--- a/0019-libparted-Use-read-only-when-probing-devices-on-linu.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-From d66b197b227e1fbd4a72f002cb8b8a7ee9461062 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Thu, 6 Aug 2015 07:17:14 -0700
-Subject: [PATCH 19/20] libparted: Use read only when probing devices on linux
- (#1245144)
-
-When a device is opened for RW closing it can trigger other actions,
-like udev scanning it for partition changes. Use read only for the
-init_* methods and RW for actual changes to the device.
-
-This adds _device_open which takes mode flags as an argument and turns
-linux_open into a wrapper for it with RW_MODE.
-
-_device_open_ro is added to open the device with RD_MODE and increment
-the open_counter. This is used in the init_* functions.
-
-_device_close is a wrapper around linux_close that decrements the
-open_counter and is used in the init_* functions.
-
-All of these changes are self-contained with no external API changes.
-The only visible change in behavior is that when a new PedDevice is
-created the device is opened in RO_MODE instead of RW_MODE.
-
-Resolves: rhbz#1245144
-(cherry picked from commit 0e169215efcdb33d588ddc2267467593bbf717c9)
----
- libparted/arch/linux.c | 62 +++++++++++++++++++++++++++++++++++---------------
- 1 file changed, 44 insertions(+), 18 deletions(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index b68130b..3934a5b 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -291,7 +291,9 @@ struct blkdev_ioctl_param {
- static char* _device_get_part_path (PedDevice const *dev, int num);
- static int _partition_is_mounted_by_path (const char* path);
- static unsigned int _device_get_partition_range(PedDevice const* dev);
--
-+static int _device_open (PedDevice* dev, int flags);
-+static int _device_open_ro (PedDevice* dev);
-+static int _device_close (PedDevice* dev);
- 
- static int
- _read_fd (int fd, char **buf)
-@@ -910,7 +912,7 @@ init_ide (PedDevice* dev)
-         if (!_device_stat (dev, &dev_stat))
-                 goto error;
- 
--        if (!ped_device_open (dev))
-+        if (!_device_open_ro (dev))
-                 goto error;
- 
-         if (ioctl (arch_specific->fd, HDIO_GET_IDENTITY, &hdi)) {
-@@ -979,11 +981,11 @@ init_ide (PedDevice* dev)
-         if (!_device_probe_geometry (dev))
-                 goto error_close_dev;
- 
--        ped_device_close (dev);
-+        _device_close (dev);
-         return 1;
- 
- error_close_dev:
--        ped_device_close (dev);
-+        _device_close (dev);
- error:
-         return 0;
- }
-@@ -1116,7 +1118,7 @@ init_scsi (PedDevice* dev)
-         char* vendor;
-         char* product;
- 
--        if (!ped_device_open (dev))
-+        if (!_device_open_ro (dev))
-                 goto error;
- 
-         if (ioctl (arch_specific->fd, SCSI_IOCTL_GET_IDLUN, &idlun) < 0) {
-@@ -1130,7 +1132,7 @@ init_scsi (PedDevice* dev)
-                         goto error_close_dev;
-                 if (!_device_probe_geometry (dev))
-                         goto error_close_dev;
--                ped_device_close (dev);
-+                _device_close (dev);
-                 return 1;
-         }
- 
-@@ -1152,11 +1154,11 @@ init_scsi (PedDevice* dev)
-         if (!_device_probe_geometry (dev))
-                 goto error_close_dev;
- 
--        ped_device_close (dev);
-+        _device_close (dev);
-         return 1;
- 
- error_close_dev:
--        ped_device_close (dev);
-+        _device_close (dev);
- error:
-         return 0;
- }
-@@ -1168,7 +1170,7 @@ init_file (PedDevice* dev)
- 
-         if (!_device_stat (dev, &dev_stat))
-                 goto error;
--        if (!ped_device_open (dev))
-+        if (!_device_open_ro (dev))
-                 goto error;
- 
-         dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
-@@ -1195,7 +1197,7 @@ init_file (PedDevice* dev)
-                 goto error_close_dev;
-         }
- 
--        ped_device_close (dev);
-+        _device_close (dev);
- 
-         dev->bios_geom.cylinders = dev->length / 4 / 32;
-         dev->bios_geom.heads = 4;
-@@ -1206,7 +1208,7 @@ init_file (PedDevice* dev)
-         return 1;
- 
- error_close_dev:
--        ped_device_close (dev);
-+        _device_close (dev);
- error:
-         return 0;
- }
-@@ -1222,7 +1224,7 @@ init_dasd (PedDevice* dev, const char* model_name)
-         if (!_device_stat (dev, &dev_stat))
-                 goto error;
- 
--        if (!ped_device_open (dev))
-+        if (!_device_open_ro (dev))
-                 goto error;
- 
-         LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev);
-@@ -1262,11 +1264,11 @@ init_dasd (PedDevice* dev, const char* model_name)
- 
-         dev->model = strdup (model_name);
- 
--        ped_device_close (dev);
-+        _device_close (dev);
-         return 1;
- 
- error_close_dev:
--        ped_device_close (dev);
-+        _device_close (dev);
- error:
-         return 0;
- }
-@@ -1281,7 +1283,7 @@ init_generic (PedDevice* dev, const char* model_name)
-         if (!_device_stat (dev, &dev_stat))
-                 goto error;
- 
--        if (!ped_device_open (dev))
-+        if (!_device_open_ro (dev))
-                 goto error;
- 
-         ped_exception_fetch_all ();
-@@ -1329,11 +1331,11 @@ init_generic (PedDevice* dev, const char* model_name)
- 
-         dev->model = strdup (model_name);
- 
--        ped_device_close (dev);
-+        _device_close (dev);
-         return 1;
- 
- error_close_dev:
--        ped_device_close (dev);
-+        _device_close (dev);
- error:
-         return 0;
- }
-@@ -1620,12 +1622,27 @@ retry:
- }
- 
- static int
-+_device_open_ro (PedDevice* dev)
-+{
-+    int rc = _device_open (dev, RD_MODE);
-+    if (rc)
-+        dev->open_count++;
-+    return rc;
-+}
-+
-+static int
- linux_open (PedDevice* dev)
- {
-+    return _device_open (dev, RW_MODE);
-+}
-+
-+static int
-+_device_open (PedDevice* dev, int flags)
-+{
-         LinuxSpecific*  arch_specific = LINUX_SPECIFIC (dev);
- 
- retry:
--        arch_specific->fd = open (dev->path, RW_MODE);
-+        arch_specific->fd = open (dev->path, flags);
- 
-         if (arch_specific->fd == -1) {
-                 char*   rw_error_msg = strerror (errno);
-@@ -1694,6 +1711,15 @@ linux_refresh_close (PedDevice* dev)
-         return 1;
- }
- 
-+static int
-+_device_close (PedDevice* dev)
-+{
-+    int rc = linux_close (dev);
-+    if (dev->open_count > 0)
-+        dev->open_count--;
-+    return rc;
-+}
-+
- #if SIZEOF_OFF_T < 8
- 
- static _syscall5(int,_llseek,
--- 
-2.4.3
-
diff --git a/0020-tests-Use-wait_for_dev_to_-functions.patch b/0020-tests-Use-wait_for_dev_to_-functions.patch
deleted file mode 100644
index 1856761..0000000
--- a/0020-tests-Use-wait_for_dev_to_-functions.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From f72968f996372d923dbeded302395d8f08445b31 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 7 Aug 2015 11:43:17 -0700
-Subject: [PATCH 20/20] tests: Use wait_for_dev_to_ functions
-
-Recent changes to udev have made some long-standing problems appear more
-frequently. udev executes various actions when changes are made to
-devices. Sometimes this can result in device nodes not appearing
-immediately. Other times it can result in EBUSY being returned. This
-patch only addresses devices that are slow to appear/disappear.
-
-It is best to use the wait_for_dev_to_appear_ and
-wait_for_dev_to_disappear_ functions than to test for existance. These
-will loop and wait for up to 2 seconds for it to appear.
-
-This also changes t9041 to fail if mkfs doesn't work since using skip
-here may hide cases when the device node doesn't appear.
-
-(cherry picked from commit 1dc13965e1108ab513662450e0171c3ea3af3bd1)
----
- tests/t1100-busy-label.sh                       | 10 ++--------
- tests/t1102-loop-label.sh                       | 25 +++++--------------------
- tests/t2320-dos-extended-noclobber.sh           |  1 +
- tests/t6001-psep.sh                             |  4 ++--
- tests/t6004-dm-many-partitions.sh               |  6 ++----
- tests/t6006-dm-512b-sectors.sh                  |  1 +
- tests/t6100-mdraid-partitions.sh                |  5 +++--
- tests/t9041-undetected-in-use-16th-partition.sh |  2 +-
- 8 files changed, 17 insertions(+), 37 deletions(-)
-
-diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh
-index 4e256d3..70e8ede 100755
---- a/tests/t1100-busy-label.sh
-+++ b/tests/t1100-busy-label.sh
-@@ -27,22 +27,16 @@ dev=$(cat dev-name)
- 
- parted -s "$dev" mklabel msdos mkpart primary fat32 1 40 > out 2>&1 || fail=1
- compare /dev/null out || fail=1
--mkfs.vfat ${dev}1 || skip_ "mkfs.vfat failed"
-+wait_for_dev_to_appear_ ${dev}1 || fail=1
-+mkfs.vfat ${dev}1 || fail=1
- 
- mount_point="`pwd`/mnt"
- 
- # Be sure to unmount upon interrupt, failure, etc.
- cleanup_fn_() { umount "${dev}1" > /dev/null 2>&1; }
- 
--# There's a race condition here: on udev-based systems, the partition#1
--# device, ${dev}1 (i.e., /dev/sdd1) is not created immediately, and
--# without some delay, this mount command would fail.  Using a flash card
--# as $dev, the loop below typically iterates 7-20 times.
--
- # create mount point dir. and mount the just-created partition on it
- mkdir $mount_point || fail=1
--i=0; while :; do test -e "${dev}1" && break; test $i = 90 && break;
--  i=$(expr $i + 1); done;
- mount "${dev}1" $mount_point || fail=1
- 
- # now that a partition is mounted, mklabel attempt must fail
-diff --git a/tests/t1102-loop-label.sh b/tests/t1102-loop-label.sh
-index 9752002..68b9af4 100644
---- a/tests/t1102-loop-label.sh
-+++ b/tests/t1102-loop-label.sh
-@@ -44,15 +44,9 @@ mv out o2 && sed -e "s,$dev,DEVICE,;s/  *$//" o2 > out
- 
- compare exp out || fail=1
- parted -s $dev rm 1 || fail=1
--if [ -e ${dev}1 ]; then
--    echo "Partition should not exist on loop device"
--    fail=1
--fi
-+wait_for_dev_to_disappear_ ${dev}1 2 || fail=1
- partprobe $dev || fail=1
--if [ -e ${dev}1 ]; then
--    echo "Partition should not exist on loop device"
--    fail=1
--fi
-+wait_for_dev_to_disappear_ ${dev}1 2 || fail=1
- 
- mount_point="`pwd`/mnt"
- 
-@@ -80,24 +74,15 @@ umount "$mount_point"
- 
- # make sure partprobe cleans up stale partition devices
- parted -s $dev mklabel msdos mkpart primary ext2 0% 100% || fail=1
--if [ ! -e ${dev}1 ]; then
--    echo "Partition doesn't exist on loop device"
--    fail=1
--fi
-+wait_for_dev_to_appear_ ${dev}1 || fail=1
- 
- mke2fs -F $dev
- partprobe $dev || fail=1
--if [ -e ${dev}1 ]; then
--    echo "Partition should not exist on loop device"
--    fail=1
--fi
-+wait_for_dev_to_disappear_ ${dev}1 2 || fail=1
- 
- # make sure new loop label removes old partitions > 1
- parted -s $dev mklabel msdos mkpart primary ext2 0% 50% mkpart primary ext2 50% 100% || fail=1
- parted -s $dev mklabel loop || fail=1
--if [ -e ${dev}2 ]; then
--    echo "Partition 2 not removed"
--    fail=1
--fi
-+wait_for_dev_to_disappear_ ${dev}2 2 || fail=1
- 
- Exit $fail
-diff --git a/tests/t2320-dos-extended-noclobber.sh b/tests/t2320-dos-extended-noclobber.sh
-index 6f3dfff..bbc4f26 100644
---- a/tests/t2320-dos-extended-noclobber.sh
-+++ b/tests/t2320-dos-extended-noclobber.sh
-@@ -32,6 +32,7 @@ scsi_dev=$(cat dev-name)
- parted -s $scsi_dev mklabel msdos || fail=1
- parted -s $scsi_dev mkpart extended 1 5 > out 2>&1 || fail=1
- parted -s $scsi_dev mkpart primary 5 10 > out 2>&1 || fail=1
-+wait_for_dev_to_appear_ ${scsi_dev}1 || fail=1
- 
- # Make sure the size of the extended partition is correct.
- # 2 sectors for 512b and 1 sector for larger. /sys/.../size is in
-diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh
-index f15090a..4c758e8 100644
---- a/tests/t6001-psep.sh
-+++ b/tests/t6001-psep.sh
-@@ -54,7 +54,7 @@ parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1
- compare /dev/null out || fail=1
- 
- #make sure device name is correct
--test -e ${dev}p1 || fail=1
-+wait_for_dev_to_appear_ ${dev}p1 || fail=1
- 
- #repeat on name not ending in a digit
- # setup: create a mapping
-@@ -66,7 +66,7 @@ parted -s $dev mklabel msdos mkpart primary fat32 1m 5m > out 2>&1 || fail=1
- compare /dev/null out || fail=1
- 
- #make sure device name is correct
--test -e ${dev}1 || fail=1
-+wait_for_dev_to_appear_ ${dev}1 || fail=1
- 
- if [ -n "$fail" ]; then
-     ls /dev/mapper
-diff --git a/tests/t6004-dm-many-partitions.sh b/tests/t6004-dm-many-partitions.sh
-index 8d291ef..7ebc48a 100755
---- a/tests/t6004-dm-many-partitions.sh
-+++ b/tests/t6004-dm-many-partitions.sh
-@@ -49,10 +49,8 @@ parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fa
- 
- # Make sure all the partitions appeared under /dev/mapper/
- for ((i=1; i<=$n_partitions; i+=1)); do
--    if [ ! -e "/dev/mapper/${dm_name}p$i" ]; then
--        fail=1
--        break
--    fi
-+    wait_for_dev_to_appear_ "/dev/mapper/${dm_name}p$i" || { fail=1; break; }
-+
-     # remove the partitions as we go, otherwise cleanup won't work.
-     dmsetup remove /dev/mapper/${dm_name}p$i
- done
-diff --git a/tests/t6006-dm-512b-sectors.sh b/tests/t6006-dm-512b-sectors.sh
-index 31abba9..c3045af 100644
---- a/tests/t6006-dm-512b-sectors.sh
-+++ b/tests/t6006-dm-512b-sectors.sh
-@@ -60,6 +60,7 @@ dev="/dev/mapper/$linear_"
- # Create msdos partition table with a partition from 1MiB to 100MiB
- parted -s $dev mklabel msdos mkpart primary ext2 1MiB 101MiB > out 2>&1 || fail=1
- compare /dev/null out || fail=1
-+wait_for_dev_to_appear_ ${dev}1 || fail=1
- 
- # The size of the partition should be 100MiB, or 204800 512b sectors
- p1_size=$(blockdev --getsz ${dev}1) || framework_failure
-diff --git a/tests/t6100-mdraid-partitions.sh b/tests/t6100-mdraid-partitions.sh
-index 6f08442..dbc5986 100755
---- a/tests/t6100-mdraid-partitions.sh
-+++ b/tests/t6100-mdraid-partitions.sh
-@@ -54,13 +54,14 @@ parted -s $md_dev mklabel gpt \
- compare /dev/null out || fail=1
- 
- # Verify that kernel has been informed about the second device.
--grep "${md_name}p2" /proc/partitions || { fail=1; cat /proc/partitions; }
-+wait_for_dev_to_appear_ ${md_dev}p2 || { fail=1; cat /proc/partitions; }
- 
- # Remove partitions from the raid device.
- parted -s $md_dev rm 2 rm 1 > out 2>&1 || fail=1
- compare /dev/null out || fail=1
- 
- # Verify that kernel has been informed about those removals.
--grep "${md_name}p[12]" /proc/partitions && { fail=1; cat /proc/partitions; }
-+wait_for_dev_to_disappear_ ${md_dev}p1 2 || { fail=1; cat /proc/partitions; }
-+wait_for_dev_to_disappear_ ${md_dev}p2 2 || { fail=1; cat /proc/partitions; }
- 
- Exit $fail
-diff --git a/tests/t9041-undetected-in-use-16th-partition.sh b/tests/t9041-undetected-in-use-16th-partition.sh
-index edaae1b..673e508 100644
---- a/tests/t9041-undetected-in-use-16th-partition.sh
-+++ b/tests/t9041-undetected-in-use-16th-partition.sh
-@@ -72,7 +72,7 @@ wait_for_dev_to_appear_ ${scsi_dev}16 || fail_ ${scsi_dev}16 did not appear
- 
- partitions="${scsi_dev}14 ${scsi_dev}15 ${scsi_dev}16"
- for i in $partitions; do
--  mkfs.ext3 $i || skip_ mkfs.ext3 $i failed
-+  mkfs.ext3 $i || fail=1
- done
- 
- # be sure to unmount upon interrupt, failure, etc.
--- 
-2.4.3
-
diff --git a/0021-fdasd-geometry-handling-updated-from-upstream-s390-t.patch b/0021-fdasd-geometry-handling-updated-from-upstream-s390-t.patch
deleted file mode 100644
index f13ef02..0000000
--- a/0021-fdasd-geometry-handling-updated-from-upstream-s390-t.patch
+++ /dev/null
@@ -1,281 +0,0 @@
-From 4d480d980a9b69b432b8d60df3c4397ba8cdc965 Mon Sep 17 00:00:00 2001
-From: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Date: Thu, 17 Sep 2015 15:33:28 +0200
-Subject: [PATCH 21/22] fdasd: geometry handling updated from upstream
- s390-tools
-
-Remove the necessity for DASD-specific ioctls for partition handling.
-This allows to correctly handle DASD-backed virtio block devices.
-
-Note that this is necessary because virtio is just the transport.
-A DASD, even if provided via virtio, still has it's unique
-characteristics, which means that only traditional DASD partition
-table formats can be used (no MBR, GPT, or similar).
-
-Use bzero for initialization to make sure all struct members are
-properly cleared. Also changed partition list handling code to be
-more similar to upstream s390-tools fdasd.
-
-Further, enhanced error handling capabilities by providing a
-return code by fdasd_get_geometry.
-
-Code is largely backported from s390-tools project.
-
-Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Acked-by: Stefan Haberland <stefan.haberland at de.ibm.com>
-Signed-off-by: Hendrik Brueckner <brueckner at linux.vnet.ibm.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
----
- include/parted/fdasd.in.h |   4 +-
- libparted/labels/fdasd.c  | 166 ++++++++++++++++++++++++++++++++--------------
- 2 files changed, 119 insertions(+), 51 deletions(-)
-
-diff --git a/include/parted/fdasd.in.h b/include/parted/fdasd.in.h
-index 6f6a7e0..4e351c4 100644
---- a/include/parted/fdasd.in.h
-+++ b/include/parted/fdasd.in.h
-@@ -190,6 +190,8 @@ typedef struct format_data_t {
- #define BLKRRPART  _IO(0x12,95)
- /* get block device sector size */
- #define BLKSSZGET  _IO(0x12,104)
-+/* device size in bytes (u64 *arg)*/
-+#define BLKGETSIZE64 _IOR(0x12,114,size_t)
- /* get device geometry */
- #define HDIO_GETGEO		0x0301
- 
-@@ -285,7 +287,7 @@ enum fdasd_failure {
- 
- void fdasd_cleanup (fdasd_anchor_t *anchor);
- void fdasd_initialize_anchor (fdasd_anchor_t * anc);
--void fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int fd);
-+int fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int fd);
- void fdasd_check_api_version (fdasd_anchor_t *anc, int fd);
- int fdasd_check_volume (fdasd_anchor_t *anc, int fd);
- int fdasd_write_labels (fdasd_anchor_t *anc, int fd);
-diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
-index 1f87937..7e6a77a 100644
---- a/libparted/labels/fdasd.c
-+++ b/libparted/labels/fdasd.c
-@@ -210,27 +210,7 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
- 	partition_info_t *p = NULL;
- 	partition_info_t *q = NULL;
- 
--	anc->devno             = 0;
--	anc->dev_type          = 0;
--	anc->used_partitions   = 0;
--
--	anc->silent            = 0;
--	anc->verbose           = 0;
--	anc->big_disk          = 0;
--	anc->volid_specified   = 0;
--	anc->config_specified  = 0;
--	anc->auto_partition    = 0;
--	anc->devname_specified = 0;
--	anc->print_table       = 0;
--
--	anc->option_reuse      = 0;
--	anc->option_recreate   = 0;
--
--	anc->vlabel_changed    = 0;
--	anc->vtoc_changed      = 0;
--	anc->blksize           = 0;
--	anc->fspace_trk        = 0;
--	anc->label_pos         = 0;
-+	bzero(anc, sizeof(fdasd_anchor_t));
- 
- 	for (i=0; i<USABLE_PARTITIONS; i++)
- 		setpos(anc, i, -1);
-@@ -272,24 +252,18 @@ fdasd_initialize_anchor (fdasd_anchor_t * anc)
- 		if (p == NULL)
- 			fdasd_error(anc, malloc_failed,
- 				    _("No room for partition info."));
--		p->used       = 0x00;
--		p->len_trk    = 0;
--		p->start_trk  = 0;
--		p->fspace_trk = 0;
--		p->type       = 0;
-+		bzero(p, sizeof(partition_info_t));
- 
- 		/* add p to double pointered list */
- 		if (i == 1) {
--	        anc->first = p;
--			p->prev = NULL;
-+		        anc->first = p;
- 		} else if (i == USABLE_PARTITIONS) {
--	        anc->last = p;
--	        p->next = NULL;
-+		        anc->last = p;
- 			p->prev = q;
- 			q->next = p;
- 		} else {
--	        p->prev = q;
--	        q->next = p;
-+	                p->prev = q;
-+	                q->next = p;
- 		}
- 
- 		p->f1 = malloc(sizeof(format1_label_t));
-@@ -947,15 +921,77 @@ fdasd_check_api_version (fdasd_anchor_t *anc, int f)
- }
- 
- /*
-+ * The following two functions match those in the DASD ECKD device driver.
-+ * They are used to compute how many records of a given size can be stored
-+ * in one track.
-+ */
-+static unsigned int ceil_quot(unsigned int d1, unsigned int d2)
-+{
-+	return (d1 + (d2 - 1)) / d2;
-+}
-+
-+/* kl: key length, dl: data length */
-+static unsigned int recs_per_track(unsigned short dev_type, unsigned int kl,
-+				   unsigned int dl)
-+{
-+	unsigned int dn, kn;
-+
-+	switch (dev_type) {
-+	case DASD_3380_TYPE:
-+		if (kl)
-+			return 1499 / (15 + 7 + ceil_quot(kl + 12, 32) +
-+				       ceil_quot(dl + 12, 32));
-+		else
-+			return 1499 / (15 + ceil_quot(dl + 12, 32));
-+	case DASD_3390_TYPE:
-+		dn = ceil_quot(dl + 6, 232) + 1;
-+		if (kl) {
-+			kn = ceil_quot(kl + 6, 232) + 1;
-+			return 1729 / (10 + 9 + ceil_quot(kl + 6 * kn, 34) +
-+				       9 + ceil_quot(dl + 6 * dn, 34));
-+		} else
-+			return 1729 / (10 + 9 + ceil_quot(dl + 6 * dn, 34));
-+	case DASD_9345_TYPE:
-+		dn = ceil_quot(dl + 6, 232) + 1;
-+		if (kl) {
-+			kn = ceil_quot(kl + 6, 232) + 1;
-+			return 1420 / (18 + 7 + ceil_quot(kl + 6 * kn, 34) +
-+				       ceil_quot(dl + 6 * dn, 34));
-+		} else
-+			return 1420 / (18 + 7 + ceil_quot(dl + 6 * dn, 34));
-+	}
-+	return 0;
-+}
-+
-+/*
-+ * Verify that number of tracks (heads) per cylinder and number of
-+ * sectors per track match the expected values for a given device type
-+ * and block size.
-+ * Returns 1 for a valid match and 0 otherwise.
-+ */
-+static int fdasd_verify_geometry(unsigned short dev_type, int blksize,
-+				 struct fdasd_hd_geometry *geometry)
-+{
-+	unsigned int expected_sectors;
-+	if (geometry->heads != 15)
-+		return 0;
-+	expected_sectors = recs_per_track(dev_type, 0, blksize);
-+	if (geometry->sectors == expected_sectors)
-+		return 1;
-+	return 0;
-+}
-+
-+/*
-  * reads dasd geometry data
-  */
--void
-+int
- fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int f)
- {
- 	PDEBUG
- 	int blksize = 0;
- 	dasd_information_t dasd_info;
- 	struct dasd_eckd_characteristics *characteristics;
-+	unsigned long long size_in_bytes;
- 
- 	/* We can't get geometry from a regular file,
- 	   so simulate something usable, for the sake of testing.  */
-@@ -979,6 +1015,12 @@ fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int f)
- 				anc->geo.heads;
- 	    anc->is_file = 1;
- 	} else {
-+	        if (ioctl(f, BLKGETSIZE64, &size_in_bytes) != 0) {
-+		        fdasd_error(anc, unable_to_ioctl,
-+				    _("Could not retrieve disk size."));
-+			goto error;
-+		}
-+
- 		if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0)
- 			fdasd_error(anc, unable_to_ioctl,
- 			    _("Could not retrieve disk geometry information."));
-@@ -988,27 +1030,51 @@ fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int f)
- 			    _("Could not retrieve blocksize information."));
- 
- 		/* get disk type */
--		if (ioctl(f, BIODASDINFO, &dasd_info) != 0)
--			fdasd_error(anc, unable_to_ioctl,
--				    _("Could not retrieve disk information."));
--
--		characteristics = (struct dasd_eckd_characteristics *)
--					&dasd_info.characteristics;
--		if (characteristics->no_cyl == LV_COMPAT_CYL &&
--		    characteristics->long_no_cyl)
--			anc->hw_cylinders = characteristics->long_no_cyl;
--		else
--			anc->hw_cylinders = characteristics->no_cyl;
-+		if (ioctl(f, BIODASDINFO, &dasd_info) != 0) {
-+		        /* verify that the geometry matches a 3390 DASD */
-+		        if (!fdasd_verify_geometry(DASD_3390_TYPE, blksize,
-+						   &anc->geo)) {
-+			        fdasd_error(anc, wrong_disk_type,
-+					    _("Disk geometry does not match a " \
-+					      "DASD device of type 3390."));
-+				goto error;
-+			}
-+			anc->dev_type = DASD_3390_TYPE;
-+			anc->hw_cylinders =
-+			        size_in_bytes / (blksize * anc->geo.heads * anc->geo.sectors);
-+			/* The VOL1 label on a CDL formatted ECKD DASD is in block 2
-+			 * It will be verified later, if this position actually holds a
-+			 * valid label record.
-+			 */
-+			anc->label_pos = 2 * blksize;
-+			/* A devno 0 is actually a valid devno, which could exist
-+			 * in the system. Since we use this number only to create
-+			 * a default volume serial, there is no serious conflict.
-+			 */
-+			anc->devno = 0;
-+		} else {
-+		        characteristics = (struct dasd_eckd_characteristics *)
-+			        &dasd_info.characteristics;
-+			if (characteristics->no_cyl == LV_COMPAT_CYL &&
-+			        characteristics->long_no_cyl)
-+		                anc->hw_cylinders = characteristics->long_no_cyl;
-+			else
-+		                anc->hw_cylinders = characteristics->no_cyl;
-+			anc->dev_type = dasd_info.dev_type;
-+			anc->label_pos = dasd_info.label_block * blksize;
-+			anc->devno = dasd_info.devno;
-+			anc->label_block = dasd_info.label_block;
-+			anc->FBA_layout = dasd_info.FBA_layout;
-+		}
- 
- 		anc->is_file = 0;
- 	}
- 
--	anc->dev_type   = dasd_info.dev_type;
--	anc->blksize    = blksize;
--	anc->label_pos  = dasd_info.label_block * blksize;
--	anc->devno      = dasd_info.devno;
--	anc->label_block = dasd_info.label_block;
--	anc->FBA_layout = dasd_info.FBA_layout;
-+	anc->blksize = blksize;
-+	return 1;
-+
-+ error:
-+	return 0;
- }
- 
- /*
--- 
-2.4.3
-
diff --git a/0022-dasd-enhance-device-probing.patch b/0022-dasd-enhance-device-probing.patch
deleted file mode 100644
index e823fb3..0000000
--- a/0022-dasd-enhance-device-probing.patch
+++ /dev/null
@@ -1,238 +0,0 @@
-From 834713b5aee1edc004f863231dd489ee3a79f536 Mon Sep 17 00:00:00 2001
-From: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Date: Thu, 17 Sep 2015 15:33:29 +0200
-Subject: [PATCH 22/22] dasd: enhance device probing
-
-Probe for all device/transport types as every block device
-could be a DASD on s390.
-
-Since the calculation of the minimum and optimum alignment
-is different between DASDs and common fixed block disks
-we need a means other than dev->type == PED_DEVICE_DASD.
-For that purpose a static function _ped_device_like_dasd()
-offering a DASD detection heuristic has been added to
-arch/linux.c.
-
-By always providing arch-specific alignment functions the
-need for DASD-specific code could be removed from device.c.
-
-Observe fdasd_get_geometry return code for proper error
-handling.
-
-Remove the obsolete API check as we no longer require the
-DASD-specific IOCTLs.
-
-Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Acked-by: Stefan Haberland <stefan.haberland at de.ibm.com>
-Signed-off-by: Hendrik Brueckner <brueckner at linux.vnet.ibm.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
----
- libparted/arch/linux.c  | 85 ++++++++++++++++++++++++++++++++++++++++---------
- libparted/device.c      | 14 +++-----
- libparted/labels/dasd.c | 18 +++++------
- 3 files changed, 82 insertions(+), 35 deletions(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index adc368d..9344ceb 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -785,9 +785,13 @@ _device_set_sector_size (PedDevice* dev)
- #endif
- 
- #if defined __s390__ || defined __s390x__
-+        /* The real_sector_size is currently needed for DASD layouts,
-+         * so we set it unconditionally. In the long run it should
-+         * be considered to use the dev->phys_sector_size in label/dasd.c.
-+         */
-+        arch_specific->real_sector_size = dev->sector_size;
-         /* Return PED_SECTOR_SIZE_DEFAULT for DASDs. */
-         if (dev->type == PED_DEVICE_DASD) {
--                arch_specific->real_sector_size = dev->sector_size;
-                 dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
-         }
- #endif
-@@ -3167,19 +3171,72 @@ linux_disk_commit (PedDisk* disk)
- {
-         if (disk->dev->type != PED_DEVICE_FILE) {
- 
--		/* We now require BLKPG support.  If this assertion fails,
--		   please write to the mailing list describing your system.
--		   Assuming it's never triggered, ...
--		   FIXME: remove this assertion in 2012.  */
--		assert (_have_blkpg ());
-+                /* We now require BLKPG support.  If this assertion fails,
-+                   please write to the mailing list describing your system.
-+                   Assuming it's never triggered, ...
-+                   FIXME: remove this assertion in 2012.  */
-+                assert (_have_blkpg ());
- 
--		if (!_disk_sync_part_table (disk))
--			return 0;
-+                if (!_disk_sync_part_table (disk))
-+                        return 0;
-         }
- 
-         return 1;
- }
- 
-+#if defined __s390__ || defined __s390x__
-+/**
-+ * Check whether this device could be a DASD
-+ *
-+ * The device probing yields PED_DEVICE_DASD for native DASD transport
-+ * If the block device uses a different transport (e.g. virtio)
-+ * a simplified heuristic (assuming a model 3390 with 4K sectors)
-+ * is applied (only) on s390x systems for this check.
-+ *
-+ * \return 1 if the geometry indicates this could be a DASD
-+ *         and 0 otherwise
-+ */
-+static int
-+_ped_device_like_dasd(const PedDevice *dev)
-+{
-+        return (dev->type == PED_DEVICE_DASD)
-+          || (dev->hw_geom.heads == 15
-+              && dev->hw_geom.sectors == 12
-+              && (dev->hw_geom.cylinders
-+                  * dev->hw_geom.heads
-+                  * dev->hw_geom.sectors
-+                  * dev->phys_sector_size
-+                  == dev->length * dev->sector_size));
-+}
-+
-+
-+
-+static PedAlignment*
-+s390_get_minimum_alignment(const PedDevice *dev)
-+{
-+#if USE_BLKID
-+        return linux_get_minimum_alignment(dev);
-+#else
-+        return ped_alignment_new(0,
-+                                 dev->phys_sector_size
-+                                 / dev->sector_size);
-+#endif
-+}
-+
-+static PedAlignment*
-+s390_get_optimum_alignment(const PedDevice *dev)
-+{
-+        /* DASD needs to use minimum alignment */
-+        if (_ped_device_like_dasd(dev))
-+                return s390_get_minimum_alignment(dev);
-+#if USE_BLKID
-+        return linux_get_optimum_alignment(dev);
-+#else
-+        return NULL;
-+#endif
-+}
-+#endif
-+
- #if USE_BLKID
- static PedAlignment*
- linux_get_minimum_alignment(const PedDevice *dev)
-@@ -3220,15 +3277,10 @@ linux_get_optimum_alignment(const PedDevice *dev)
- 		&& PED_DEFAULT_ALIGNMENT % optimal_io == 0)
- 	    || (!optimal_io && minimum_io
- 		&& PED_DEFAULT_ALIGNMENT % minimum_io == 0)
--           ) {
--            /* DASD needs to use minimum alignment */
--            if (dev->type == PED_DEVICE_DASD)
--                return linux_get_minimum_alignment(dev);
--
-+           )
-             return ped_alignment_new(
-                     blkid_topology_get_alignment_offset(tp) / dev->sector_size,
-                     PED_DEFAULT_ALIGNMENT / dev->sector_size);
--        }
- 
-         /* If optimal_io_size is 0 and we don't meet the other criteria
-            for using the device.c default, return the minimum alignment. */
-@@ -3255,7 +3307,10 @@ static PedDeviceArchOps linux_dev_ops = {
-         sync:           linux_sync,
-         sync_fast:      linux_sync_fast,
-         probe_all:      linux_probe_all,
--#if USE_BLKID
-+#if defined __s390__ || defined __s390x__
-+        get_minimum_alignment:	s390_get_minimum_alignment,
-+        get_optimum_alignment:	s390_get_optimum_alignment,
-+#elif USE_BLKID
-         get_minimum_alignment:	linux_get_minimum_alignment,
-         get_optimum_alignment:	linux_get_optimum_alignment,
- #endif
-diff --git a/libparted/device.c b/libparted/device.c
-index cdcc117..36fecd2 100644
---- a/libparted/device.c
-+++ b/libparted/device.c
-@@ -550,16 +550,10 @@ ped_device_get_optimum_alignment(const PedDevice *dev)
-         /* If the arch specific code could not give as an alignment
-            return a default value based on the type of device. */
-         if (align == NULL) {
--                switch (dev->type) {
--                case PED_DEVICE_DASD:
--                        align = ped_device_get_minimum_alignment(dev);
--                        break;
--                default:
--                        /* Align to a grain of 1MiB (like vista / win7) */
--                        align = ped_alignment_new(0,
--                                                  (PED_DEFAULT_ALIGNMENT
--						   / dev->sector_size));
--                }
-+                /* Align to a grain of 1MiB (like vista / win7) */
-+                align = ped_alignment_new(0,
-+                                          (PED_DEFAULT_ALIGNMENT
-+                                           / dev->sector_size));
-         }
- 
-         return align;
-diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
-index fa9414f..bb32d66 100644
---- a/libparted/labels/dasd.c
-+++ b/libparted/labels/dasd.c
-@@ -214,19 +214,13 @@ dasd_probe (const PedDevice *dev)
- 
- 	PED_ASSERT(dev != NULL);
- 
--	if (!(dev->type == PED_DEVICE_DASD
--              || dev->type == PED_DEVICE_VIODASD
--              || dev->type == PED_DEVICE_FILE))
--		return 0;
--
- 	arch_specific = LINUX_SPECIFIC(dev);
- 
- 	/* add partition test here */
- 	fdasd_initialize_anchor(&anchor);
- 
--	fdasd_get_geometry(dev, &anchor, arch_specific->fd);
--
--	fdasd_check_api_version(&anchor, arch_specific->fd);
-+	if (fdasd_get_geometry(dev, &anchor, arch_specific->fd) == 0)
-+                goto error_cleanup;
- 
- 	/* Labels are required on CDL formatted DASDs. */
- 	if (fdasd_check_volume(&anchor, arch_specific->fd) &&
-@@ -276,7 +270,9 @@ dasd_read (PedDisk* disk)
- 
- 	fdasd_initialize_anchor(&anchor);
- 
--	fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd);
-+	if (fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd) == 0)
-+                goto error_close_dev;
-+
- 	disk_specific->label_block = anchor.label_block;
- 
- 	if ((anchor.geo.cylinders * anchor.geo.heads) > BIG_DISK_SIZE)
-@@ -630,7 +626,9 @@ dasd_write (const PedDisk* disk)
- 
- 	/* initialize the anchor */
- 	fdasd_initialize_anchor(&anchor);
--	fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd);
-+	if (fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd) == 0)
-+                goto error;
-+
- 	fdasd_check_volume(&anchor, arch_specific->fd);
- 	memcpy(anchor.vlabel, &disk_specific->vlabel, sizeof(volume_label_t));
- 	anchor.vlabel_changed++;
--- 
-2.4.3
-
diff --git a/0023-parted-fix-build-error-on-s390.patch b/0023-parted-fix-build-error-on-s390.patch
deleted file mode 100644
index 4b60f19..0000000
--- a/0023-parted-fix-build-error-on-s390.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 388bab890a4e09b09d2428c0e773ed083295f91b Mon Sep 17 00:00:00 2001
-From: Colin Watson <cjwatson at ubuntu.com>
-Date: Thu, 29 Oct 2015 21:12:01 +0100
-Subject: [PATCH] parted: fix build error on s390
-
-The preceding dasd probing patches have introduced a compile error
-when building with blkid support. Fixed by reordering function
-definitions.
-
-Signed-off-by: Colin Watson <cjwatson at ubuntu.com>
-Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
----
- libparted/arch/linux.c | 106 ++++++++++++++++++++++++-------------------------
- 1 file changed, 53 insertions(+), 53 deletions(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index 9344ceb..1198f52 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -3184,59 +3184,6 @@ linux_disk_commit (PedDisk* disk)
-         return 1;
- }
- 
--#if defined __s390__ || defined __s390x__
--/**
-- * Check whether this device could be a DASD
-- *
-- * The device probing yields PED_DEVICE_DASD for native DASD transport
-- * If the block device uses a different transport (e.g. virtio)
-- * a simplified heuristic (assuming a model 3390 with 4K sectors)
-- * is applied (only) on s390x systems for this check.
-- *
-- * \return 1 if the geometry indicates this could be a DASD
-- *         and 0 otherwise
-- */
--static int
--_ped_device_like_dasd(const PedDevice *dev)
--{
--        return (dev->type == PED_DEVICE_DASD)
--          || (dev->hw_geom.heads == 15
--              && dev->hw_geom.sectors == 12
--              && (dev->hw_geom.cylinders
--                  * dev->hw_geom.heads
--                  * dev->hw_geom.sectors
--                  * dev->phys_sector_size
--                  == dev->length * dev->sector_size));
--}
--
--
--
--static PedAlignment*
--s390_get_minimum_alignment(const PedDevice *dev)
--{
--#if USE_BLKID
--        return linux_get_minimum_alignment(dev);
--#else
--        return ped_alignment_new(0,
--                                 dev->phys_sector_size
--                                 / dev->sector_size);
--#endif
--}
--
--static PedAlignment*
--s390_get_optimum_alignment(const PedDevice *dev)
--{
--        /* DASD needs to use minimum alignment */
--        if (_ped_device_like_dasd(dev))
--                return s390_get_minimum_alignment(dev);
--#if USE_BLKID
--        return linux_get_optimum_alignment(dev);
--#else
--        return NULL;
--#endif
--}
--#endif
--
- #if USE_BLKID
- static PedAlignment*
- linux_get_minimum_alignment(const PedDevice *dev)
-@@ -3293,6 +3240,59 @@ linux_get_optimum_alignment(const PedDevice *dev)
- }
- #endif
- 
-+#if defined __s390__ || defined __s390x__
-+/**
-+ * Check whether this device could be a DASD
-+ *
-+ * The device probing yields PED_DEVICE_DASD for native DASD transport
-+ * If the block device uses a different transport (e.g. virtio)
-+ * a simplified heuristic (assuming a model 3390 with 4K sectors)
-+ * is applied (only) on s390x systems for this check.
-+ *
-+ * \return 1 if the geometry indicates this could be a DASD
-+ *         and 0 otherwise
-+ */
-+static int
-+_ped_device_like_dasd(const PedDevice *dev)
-+{
-+        return (dev->type == PED_DEVICE_DASD)
-+          || (dev->hw_geom.heads == 15
-+              && dev->hw_geom.sectors == 12
-+              && (dev->hw_geom.cylinders
-+                  * dev->hw_geom.heads
-+                  * dev->hw_geom.sectors
-+                  * dev->phys_sector_size
-+                  == dev->length * dev->sector_size));
-+}
-+
-+
-+
-+static PedAlignment*
-+s390_get_minimum_alignment(const PedDevice *dev)
-+{
-+#if USE_BLKID
-+        return linux_get_minimum_alignment(dev);
-+#else
-+        return ped_alignment_new(0,
-+                                 dev->phys_sector_size
-+                                 / dev->sector_size);
-+#endif
-+}
-+
-+static PedAlignment*
-+s390_get_optimum_alignment(const PedDevice *dev)
-+{
-+        /* DASD needs to use minimum alignment */
-+        if (_ped_device_like_dasd(dev))
-+                return s390_get_minimum_alignment(dev);
-+#if USE_BLKID
-+        return linux_get_optimum_alignment(dev);
-+#else
-+        return NULL;
-+#endif
-+}
-+#endif
-+
- static PedDeviceArchOps linux_dev_ops = {
-         _new:           linux_new,
-         destroy:        linux_destroy,
--- 
-2.4.3
-
diff --git a/0024-fdasd.c-Safeguard-against-geometry-misprobing.patch b/0024-fdasd.c-Safeguard-against-geometry-misprobing.patch
deleted file mode 100644
index 8683e25..0000000
--- a/0024-fdasd.c-Safeguard-against-geometry-misprobing.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 953f340c3e24c296e9e73f4a0b45ff6563359592 Mon Sep 17 00:00:00 2001
-From: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Date: Fri, 5 Feb 2016 14:47:11 +0100
-Subject: [PATCH] fdasd.c: Safeguard against geometry misprobing
-
-Fixes an issue with parted print being run against a logical
-volume realised by extents on a physical volume residing on
-a DASD.
-We must make sure that geometry, device blocksize and DASD
-attributes are present before we start format verifications
-If any of it is missing this is not a DASD.
-
-Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
----
- libparted/labels/fdasd.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
-index 7e6a77a..968b332 100644
---- a/libparted/labels/fdasd.c
-+++ b/libparted/labels/fdasd.c
-@@ -1021,13 +1021,20 @@ fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int f)
- 			goto error;
- 		}
- 
--		if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0)
-+		if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0 ||
-+		        anc->geo.heads == 0 ||
-+		        anc->geo.sectors == 0 ||
-+		        anc->geo.cylinders == 0 ) {
- 			fdasd_error(anc, unable_to_ioctl,
- 			    _("Could not retrieve disk geometry information."));
-+			goto error;
-+		}
- 
--		if (ioctl(f, BLKSSZGET, &blksize) != 0)
-+		if (ioctl(f, BLKSSZGET, &blksize) != 0) {
- 			fdasd_error(anc, unable_to_ioctl,
- 			    _("Could not retrieve blocksize information."));
-+			goto error;
-+		}
- 
- 		/* get disk type */
- 		if (ioctl(f, BIODASDINFO, &dasd_info) != 0) {
--- 
-2.5.0
-
diff --git a/0025-Add-libparted-fs-resize.pc.patch b/0025-Add-libparted-fs-resize.pc.patch
deleted file mode 100644
index 4d904c6..0000000
--- a/0025-Add-libparted-fs-resize.pc.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 151dd81cd1e86c1329488a892fa5df38aae132f5 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Mon, 29 Feb 2016 11:34:31 -0800
-Subject: [PATCH 25/28] Add libparted-fs-resize.pc
-
-Add a pkgconfig file for the filesystem resize library.
-
-(cherry picked from commit 56ede67e254132eba72b0c3e74b7b3677c22782d)
----
- Makefile.am               |  3 ++-
- configure.ac              |  1 +
- libparted-fs-resize.pc.in | 10 ++++++++++
- 3 files changed, 13 insertions(+), 1 deletion(-)
- create mode 100644 libparted-fs-resize.pc.in
-
-diff --git a/Makefile.am b/Makefile.am
-index 686b61c..c426b8c 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -6,6 +6,7 @@ EXTRA_DIST =				\
-   .prev-version				\
-   BUGS					\
-   libparted.pc.in			\
-+  libparted-fs-resize.pc.in		\
-   parted.spec.in			\
-   parted.spec				\
-   scripts/data/abi/baseline_symbols.txt \
-@@ -18,7 +19,7 @@ EXTRA_DIST =				\
- aclocaldir=$(datadir)/aclocal
- 
- pcdir = $(libdir)/pkgconfig
--pc_DATA = libparted.pc
-+pc_DATA = libparted.pc libparted-fs-resize.pc
- 
- # This is best not done via configure.ac, because automake's
- # make distcheck target does not like auto-generated files
-diff --git a/configure.ac b/configure.ac
-index 436d0e2..3d57157 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -613,6 +613,7 @@ libparted/labels/Makefile
- libparted/fs/Makefile
- libparted/tests/Makefile
- libparted.pc
-+libparted-fs-resize.pc
- parted/Makefile
- partprobe/Makefile
- doc/Makefile
-diff --git a/libparted-fs-resize.pc.in b/libparted-fs-resize.pc.in
-new file mode 100644
-index 0000000..ed9b3d6
---- /dev/null
-+++ b/libparted-fs-resize.pc.in
-@@ -0,0 +1,10 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+
-+Name: libparted-fs-resize
-+Description: The GNU Parted filesystem resize shared library
-+Version: @VERSION@
-+Libs: -L${libdir} -lparted-fs-resize
-+Cflags: -I${includedir}
--- 
-2.5.0
-
diff --git a/0026-tests-Add-udevadm-settle-to-wait_for_-loop-1260664.patch b/0026-tests-Add-udevadm-settle-to-wait_for_-loop-1260664.patch
deleted file mode 100644
index 8a49b15..0000000
--- a/0026-tests-Add-udevadm-settle-to-wait_for_-loop-1260664.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 889e484922d3d5df300718ca229e12e5601e774a Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Tue, 1 Mar 2016 10:38:26 -0800
-Subject: [PATCH 26/28] tests: Add udevadm settle to wait_for_ loop (#1260664)
-
-Sometimes the device will vanish after the wait_for_dev_to_appear exits.
-Add udevadm settle in an attempt to make sure the udev system is done
-flapping around and the device will stay in place.
-
-Related: rhbz#1260664
----
- tests/t-lib-helpers.sh            | 2 ++
- tests/t-local.sh                  | 2 ++
- tests/t6001-psep.sh               | 2 ++
- tests/t6004-dm-many-partitions.sh | 1 +
- tests/t6005-dm-uuid.sh            | 2 ++
- tests/t6100-mdraid-partitions.sh  | 1 +
- 6 files changed, 10 insertions(+)
-
-diff --git a/tests/t-lib-helpers.sh b/tests/t-lib-helpers.sh
-index 4e83a05..298f1fc 100644
---- a/tests/t-lib-helpers.sh
-+++ b/tests/t-lib-helpers.sh
-@@ -371,6 +371,7 @@ wait_for_dev_to_appear_()
-   local i=0
-   local incr=1
-   while :; do
-+    udevadm settle
-     ls "$file" > /dev/null 2>&1 && return 0
-     sleep .1 2>/dev/null || { sleep 1; incr=10; }
-     i=$(expr $i + $incr); test $i = 20 && break
-@@ -386,6 +387,7 @@ wait_for_dev_to_disappear_()
-   local i=0
-   local incr=1
-   while :; do
-+    udevadm settle
-     ls "$file" > /dev/null 2>&1 || return 0
-     sleep .1 2>/dev/null || { sleep 1; incr=10; }
-     i=$(expr $i + $incr); test $i -ge $(expr $n_sec \* 10) && break
-diff --git a/tests/t-local.sh b/tests/t-local.sh
-index b40a5a0..a7d5226 100644
---- a/tests/t-local.sh
-+++ b/tests/t-local.sh
-@@ -47,6 +47,7 @@ wait_for_dev_to_appear_()
-   local i=0
-   local incr=1
-   while :; do
-+    udevadm settle
-     ls "$file" > /dev/null 2>&1 && return 0
-     sleep .1 2>/dev/null || { sleep 1; incr=10; }
-     i=$(expr $i + $incr); test $i = 20 && break
-@@ -110,6 +111,7 @@ scsi_debug_setup_()
-   local i=0
-   local new_dev
-   while :; do
-+    udevadm settle
-     new_dev=$(new_sdX_) && break
-     sleep .1 2>/dev/null || { sleep 1; incr=10; }
-     i=$(expr $i + $incr); test $i = 20 && break
-diff --git a/tests/t6001-psep.sh b/tests/t6001-psep.sh
-index 4c758e8..2985cf5 100644
---- a/tests/t6001-psep.sh
-+++ b/tests/t6001-psep.sh
-@@ -19,6 +19,8 @@
- . "${srcdir=.}/init.sh"; path_prepend_ ../parted
- 
- require_root_
-+require_udevadm_settle_
-+
- (dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
- 
- # Device maps names - should be random to not conflict with existing ones on
-diff --git a/tests/t6004-dm-many-partitions.sh b/tests/t6004-dm-many-partitions.sh
-index 7ebc48a..01d7fc0 100755
---- a/tests/t6004-dm-many-partitions.sh
-+++ b/tests/t6004-dm-many-partitions.sh
-@@ -20,6 +20,7 @@
- . "${srcdir=.}/init.sh"; path_prepend_ ../parted
- 
- require_root_
-+require_udevadm_settle_
- (dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
- 
- ss=$sector_size_
-diff --git a/tests/t6005-dm-uuid.sh b/tests/t6005-dm-uuid.sh
-index ce1251a..a48ae72 100755
---- a/tests/t6005-dm-uuid.sh
-+++ b/tests/t6005-dm-uuid.sh
-@@ -20,6 +20,7 @@
- . "${srcdir=.}/init.sh"; path_prepend_ ../parted
- 
- require_root_
-+require_udevadm_settle_
- (dmsetup --help) > /dev/null 2>&1 || skip_test_ "No dmsetup installed"
- 
- ss=$sector_size_
-@@ -46,6 +47,7 @@ for ((i=1; i<=$n_partitions; i+=1)); do
-   cmd="$cmd mkpart p$i ${s}s ${s}s"
- done
- parted -m -a min -s /dev/mapper/$dm_name mklabel gpt $cmd > /dev/null 2>&1 || fail=1
-+wait_for_dev_to_appear_ /dev/mapper/${dm_name}p${n_partitions} || fail=1
- 
- # Make sure all the partitions have UUIDs
- for ((i=1; i<=$n_partitions; i+=1)); do
-diff --git a/tests/t6100-mdraid-partitions.sh b/tests/t6100-mdraid-partitions.sh
-index dbc5986..dbb1686 100755
---- a/tests/t6100-mdraid-partitions.sh
-+++ b/tests/t6100-mdraid-partitions.sh
-@@ -38,6 +38,7 @@ parted -s "$scsi_dev" mklabel gpt \
-     mkpart p1 ext2 1M 4M \
-     mkpart p2 ext2 5M 8M > out 2>&1 || fail=1
- compare /dev/null out || fail=1
-+wait_for_dev_to_appear_ ${scsi_dev}2 || { fail=1; cat /proc/partitions; }
- 
- cleanup_fn_() {
-   # stop mdraid array
--- 
-2.5.0
-
diff --git a/0027-tests-Add-wait-to-t9042-1257415.patch b/0027-tests-Add-wait-to-t9042-1257415.patch
deleted file mode 100644
index ebf1415..0000000
--- a/0027-tests-Add-wait-to-t9042-1257415.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 91c2993edc47f590f1d3199976c970768fd6964c Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Tue, 1 Mar 2016 13:51:54 -0800
-Subject: [PATCH 27/28] tests: Add wait to t9042 (#1257415)
-
-Also make the new disklabel and first partition all in one step to
-prevent udev problems.
-
-Resolves: rhbz#1257415
----
- tests/t9042-dos-partition-limit.sh | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/t9042-dos-partition-limit.sh b/tests/t9042-dos-partition-limit.sh
-index b01828c..1a69384 100644
---- a/tests/t9042-dos-partition-limit.sh
-+++ b/tests/t9042-dos-partition-limit.sh
-@@ -44,8 +44,8 @@ printf '%s\n' "BYT;" \
-     "1:$((start-2))s:$((n-1))s:$((n-start+2))s:::lba;" \
-   > exp || fail=1
- 
--parted -s $scsi_dev mklabel msdos || fail=1
--parted -s -a min $scsi_dev mkpart extended $((start-2))s 100% || fail=1
-+parted -s -a min $scsi_dev mklabel msdos mkpart extended $((start-2))s 100% || fail=1
-+wait_for_dev_to_appear_ ${scsi_dev}1 || fail=1
- 
- i=1
- while :; do
--- 
-2.5.0
-
diff --git a/0028-tests-Fix-t1700-failing-on-a-host-with-a-4k-xfs-file.patch b/0028-tests-Fix-t1700-failing-on-a-host-with-a-4k-xfs-file.patch
deleted file mode 100644
index aa5bf07..0000000
--- a/0028-tests-Fix-t1700-failing-on-a-host-with-a-4k-xfs-file.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 1fc0439a5bd27697fb5daa911f776de4a69e0ca3 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Mon, 29 Feb 2016 14:31:35 -0800
-Subject: [PATCH 28/28] tests: Fix t1700 failing on a host with a 4k xfs
- filesystem (#1260664)
-
-The problem is that mkfs.xfs won't work if the file it is trying to
-create is on a filesystem with a sector size larger than the passed
--ssize value. So a host with 4k disks (eg. s390) and the xfs filesystem
-will fail with the error message:
-    illegal sector size 512; hw sector is 4096
-
-Failures setting up the environment for the test aren't parted bugs.
-This stops treating mkfs and dd errors as test failures, skipping the fs
-and logging a warning.
-
-Related: rhbz#1260664
----
- tests/t1700-probe-fs.sh | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/tests/t1700-probe-fs.sh b/tests/t1700-probe-fs.sh
-index 94ed9ae..b13cec0 100755
---- a/tests/t1700-probe-fs.sh
-+++ b/tests/t1700-probe-fs.sh
-@@ -39,13 +39,13 @@ for type in ext2 ext3 ext4 btrfs xfs nilfs2 ntfs vfat hfsplus; do
-       hfsplus) fsname=hfs+;;
-   esac
- 
--  # create an $type file system
-+  # create an $type file system, creation failures are not parted bugs,
-+  # skip the filesystem instead of failing the test.
-   if [ "$type" = "xfs" ]; then
--      # Work around a problem with s390
--      mkfs.xfs -ssize=$ss -dfile,name=$dev,size=${n_sectors}s || fail=1
-+      mkfs.xfs -ssize=$ss -dfile,name=$dev,size=${n_sectors}s || { warn_ "$ME: mkfs.$type failed, skipping"; continue; }
-   else
--      dd if=/dev/null of=$dev bs=$ss seek=$n_sectors >/dev/null || fail=1
--      mkfs.$type $force $dev || { warn_ $ME: mkfs.$type failed; fail=1; continue; }
-+      dd if=/dev/null of=$dev bs=$ss seek=$n_sectors >/dev/null || { warn_ "$ME: dd failed, skipping $type"; continue; }
-+      mkfs.$type $force $dev || { warn_ "$ME: mkfs.$type failed skipping"; continue; }
-   fi
- 
-   # probe the $type file system
-@@ -57,7 +57,7 @@ done
- # Some features should indicate ext4 by themselves.
- for feature in uninit_bg flex_bg; do
-   # create an ext3 file system
--  dd if=/dev/null of=$dev bs=1024 seek=4096 >/dev/null || fail=1
-+  dd if=/dev/null of=$dev bs=1024 seek=4096 >/dev/null || skip_ "dd failed"
-   mkfs.ext3 -F $dev >/dev/null || skip_ "mkfs.ext3 failed"
- 
-   # set the feature
--- 
-2.5.0
-
diff --git a/0029-lib-fs-resize-Prevent-crash-resizing-FAT-with-very-d.patch b/0029-lib-fs-resize-Prevent-crash-resizing-FAT-with-very-d.patch
deleted file mode 100644
index 3624c8a..0000000
--- a/0029-lib-fs-resize-Prevent-crash-resizing-FAT-with-very-d.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9a95ca5da96846f3edea48ab18c6365001805e70 Mon Sep 17 00:00:00 2001
-From: Mike Fleetwood <mike.fleetwood at googlemail.com>
-Date: Sun, 28 Feb 2016 15:36:10 +0000
-Subject: [PATCH 29/30] lib-fs-resize: Prevent crash resizing FAT with very
- deep directories
-
-Resizing a FAT file system crashes in libparted/fs/r/fat/count.c
-flag_traverse_dir() if the length of any path name in the file system
-overflows the 512 byte file_name local buffer.  Increase buffer to 4096,
-PATH_MAX on Linux.
-
-Reported in
-https://bugzilla.gnome.org/show_bug.cgi?id=762448
----
- libparted/fs/r/fat/count.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libparted/fs/r/fat/count.c b/libparted/fs/r/fat/count.c
-index 7949e47..a5837c0 100644
---- a/libparted/fs/r/fat/count.c
-+++ b/libparted/fs/r/fat/count.c
-@@ -219,7 +219,7 @@ flag_traverse_dir (FatTraverseInfo* trav_info) {
- 	PedFileSystem*		fs = trav_info->fs;
- 	FatDirEntry*		this_entry;
- 	FatTraverseInfo*	subdir_trav_info;
--	char			file_name [512];
-+	char			file_name [4096];
- 	char*			file_name_start;
- 	FatCluster		first_cluster;
- 	PedSector		size;
--- 
-2.5.0
-
diff --git a/0030-tests-t3000-resize-fs.sh-Add-very-deep-directory.patch b/0030-tests-t3000-resize-fs.sh-Add-very-deep-directory.patch
deleted file mode 100644
index a16e10e..0000000
--- a/0030-tests-t3000-resize-fs.sh-Add-very-deep-directory.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 599ce25c802fc1154ed619fde4249bb381430407 Mon Sep 17 00:00:00 2001
-From: Mike Fleetwood <mike.fleetwood at googlemail.com>
-Date: Sun, 28 Feb 2016 15:36:11 +0000
-Subject: [PATCH 30/30] tests: t3000-resize-fs.sh: Add very deep directory
-
-Create 500 deep directory tree, with longest name of 4000 characters, to
-the file system being resized to test the fix to prevent crash when
-resizing a FAT file system with such a long path.
----
- tests/t3000-resize-fs.sh | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
-index a79a307..608871c 100755
---- a/tests/t3000-resize-fs.sh
-+++ b/tests/t3000-resize-fs.sh
-@@ -46,6 +46,13 @@ device_sectors_required=$(echo $default_end | sed 's/s$//')
- # Ensure that $dev is large enough for this test
- test $device_sectors_required -le $dev_n_sectors || fail=1
- 
-+# create mount point dir
-+mount_point="`pwd`/mnt"
-+mkdir "$mount_point" || fail=1
-+
-+# be sure to unmount upon interrupt, failure, etc.
-+cleanup_fn_() { umount "${dev}1" > /dev/null 2>&1; }
-+
- for fs_type in hfs+ fat32 fat16; do
-   echo "fs_type=$fs_type"
- 
-@@ -69,6 +76,15 @@ for fs_type in hfs+ fat32 fat16; do
-   # create the file system
-   $mkfs_cmd ${dev}1 || fail=1
- 
-+  # create 500 deep directory tree with longest name 4000 characters
-+  # to catch core dump in libparted/fs/r/fat/count.c flag_traverse_dir()
-+  # overflowing 512 byte file_name local buffer.
-+  mount "${dev}1" "$mount_point" || fail=1
-+  cat /dev/null > exp
-+  ( cd "$mount_point"; for d in `seq 500`; do mkdir TESTDIR; cd TESTDIR; done ) > out
-+  compare exp out || fail=1   # Ensure no errors creating directory tree
-+  umount "${dev}1" || fail=1
-+
-   # NOTE: shrinking is the only type of resizing that works.
-   # resize that file system to be one cylinder (8MiB) smaller
-   fs-resize ${dev}1 0 $new_end > out 2>&1 || fail=1
--- 
-2.5.0
-
diff --git a/0031-Use-BLKSSZGET-to-get-device-sector-size-in-_device_p.patch b/0031-Use-BLKSSZGET-to-get-device-sector-size-in-_device_p.patch
deleted file mode 100644
index b458a2d..0000000
--- a/0031-Use-BLKSSZGET-to-get-device-sector-size-in-_device_p.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 61dd3d4c5eb782eb43caa95342e63727db3f8281 Mon Sep 17 00:00:00 2001
-From: David Cantrell <dcantrell at redhat.com>
-Date: Thu, 17 Mar 2016 09:24:55 -0400
-Subject: [PATCH] Use BLKSSZGET to get device sector size in
- _device_probe_geometry()
-
-Seen on certain newer devices (such as >32G SDHC memory cards), the
-HDIO_GETGEO ioctl does not return useful information.  The libparted
-code records hardware and bios reported geometry information, but all of
-that is largely unusable these days.  The information is used in the
-PedConstraint code for aligning partitions.  The sector count is most
-useful.  Rather than only trying HDIO_GETGIO, first initialize the
-bios_geom fields to 0 and then use BLKSSZGET to capture the sector size.
-If that fails, try HDIO_GETGEO.  And if that fails, raise a warning and
-fall back on the library's default sector size macro.
-
-This problem showed up on Raspberry Pi devices where users were
-attempting to grow a partition to fill the SDHC card.  Using the
-optimal_aligned_constraint returned invalid geometry information
-(98703359 instead of 124735488 sectors).  The issue was reported here:
-
-    https://github.com/fedberry/fedberry/issues/8
-
-And to the pyparted project:
-
-    https://github.com/rhinstaller/pyparted/issues/25
-
-I've applied this patch locally to parted, rebuilt, and reinstalled it
-and it is working correctly for the problem SDHC cards.
-
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
----
- libparted/arch/linux.c | 40 +++++++++++++++++++++++++---------------
- 1 file changed, 25 insertions(+), 15 deletions(-)
-
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index 1198f52..326b956 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -852,6 +852,7 @@ _device_probe_geometry (PedDevice* dev)
-         LinuxSpecific*          arch_specific = LINUX_SPECIFIC (dev);
-         struct stat             dev_stat;
-         struct hd_geometry      geometry;
-+        int                     sector_size = 0;
- 
-         if (!_device_stat (dev, &dev_stat))
-                 return 0;
-@@ -863,26 +864,35 @@ _device_probe_geometry (PedDevice* dev)
-         if (!dev->length)
-                 return 0;
- 
--        /* The GETGEO ioctl is no longer useful (as of linux 2.6.x).  We could
--         * still use it in 2.4.x, but this is contentious.  Perhaps we should
--         * move to EDD. */
--        dev->bios_geom.sectors = 63;
--        dev->bios_geom.heads = 255;
--        dev->bios_geom.cylinders
--                = dev->length / (63 * 255);
-+        /* initialize the bios_geom values to something */
-+        dev->bios_geom.sectors = 0;
-+        dev->bios_geom.heads = 0;
-+        dev->bios_geom.cylinders = 0;
- 
--        /* FIXME: what should we put here?  (TODO: discuss on linux-kernel) */
--        if (!ioctl (arch_specific->fd, HDIO_GETGEO, &geometry)
-+        if (!ioctl (arch_specific->fd, BLKSSZGET, &sector_size)) {
-+                /* get the sector count first */
-+                dev->bios_geom.sectors = 1 + (sector_size / PED_SECTOR_SIZE_DEFAULT);
-+                dev->bios_geom.heads = 255;
-+        } else if (!ioctl (arch_specific->fd, HDIO_GETGEO, &geometry)
-                         && geometry.sectors && geometry.heads) {
--                dev->hw_geom.sectors = geometry.sectors;
--                dev->hw_geom.heads = geometry.heads;
--                dev->hw_geom.cylinders
--                        = dev->length / (dev->hw_geom.heads
--                                         * dev->hw_geom.sectors);
-+                /* if BLKSSZGET failed, try the deprecated HDIO_GETGEO */
-+                dev->bios_geom.sectors = geometry.sectors;
-+                dev->bios_geom.heads = geometry.heads;
-         } else {
--                dev->hw_geom = dev->bios_geom;
-+                ped_exception_throw (
-+                        PED_EXCEPTION_WARNING,
-+                        PED_EXCEPTION_OK,
-+                        _("Could not determine sector size for %s: %s.\n"
-+                          "Using the default sector size (%lld)."),
-+                        dev->path, strerror (errno), PED_SECTOR_SIZE_DEFAULT);
-+                dev->bios_geom.sectors = 2;
-+                dev->bios_geom.heads = 255;
-         }
- 
-+        dev->bios_geom.cylinders
-+                = dev->length / (dev->bios_geom.heads
-+                                 * dev->bios_geom.sectors);
-+        dev->hw_geom = dev->bios_geom;
-         return 1;
- }
- 
--- 
-2.5.0
-
diff --git a/0032-parted-fix-the-rescue-command.patch b/0032-parted-fix-the-rescue-command.patch
deleted file mode 100644
index 72a9de2..0000000
--- a/0032-parted-fix-the-rescue-command.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 0b996d3ebe95fdb6704f2c1d1a82574e07e86798 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Tue, 12 Apr 2016 16:13:44 -0700
-Subject: [PATCH 32/36] parted: fix the rescue command
-
-The rescue command often failed to locate a filesystem due to it
-leaving cylinder alignment on, which snapped the allowed bounds
-of the filesystem down to the next lower cylinder boundary,
-causing the detected filesystem to be rejected due to not fitting.
-
-(cherry picked from commit e09c30fb53179319ba1543813b5b4024e923b795)
----
- parted/parted.c          |  4 ++++
- tests/Makefile.am        |  1 +
- tests/t1701-rescue-fs.sh | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 57 insertions(+)
- create mode 100644 tests/t1701-rescue-fs.sh
-
-diff --git a/parted/parted.c b/parted/parted.c
-index f8c81ca..18b778c 100644
---- a/parted/parted.c
-+++ b/parted/parted.c
-@@ -1472,6 +1472,10 @@ do_rescue (PedDevice** dev, PedDisk** diskp)
-         disk = ped_disk_new (*dev);
-         if (!disk)
-                 goto error;
-+        if (ped_disk_is_flag_available(disk, PED_DISK_CYLINDER_ALIGNMENT))
-+                if (!ped_disk_set_flag(disk, PED_DISK_CYLINDER_ALIGNMENT,
-+                                       0))
-+                        goto error;
- 
-         if (!command_line_get_sector (_("Start?"), *dev, &start, NULL, NULL))
-                 goto error_destroy_disk;
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 001b9de..6a06dce 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -43,6 +43,7 @@ TESTS = \
-   t1102-loop-label.sh \
-   t1104-remove-and-add-partition.sh \
-   t1700-probe-fs.sh \
-+  t1701-rescue-fs.sh \
-   t2200-dos-label-recog.sh \
-   t2201-pc98-label-recog.sh \
-   t2300-dos-label-extended-bootcode.sh \
-diff --git a/tests/t1701-rescue-fs.sh b/tests/t1701-rescue-fs.sh
-new file mode 100644
-index 0000000..9b726cf
---- /dev/null
-+++ b/tests/t1701-rescue-fs.sh
-@@ -0,0 +1,52 @@
-+#!/bin/sh
-+# rescue ext4 file system
-+
-+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3 of the License, or
-+# (at your option) any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+. "${srcdir=.}/init.sh"; path_prepend_ ../parted
-+require_512_byte_sector_size_
-+require_root_
-+require_scsi_debug_module_
-+
-+# create memory-backed device
-+scsi_debug_setup_ sector_size=$sector_size_ dev_size_mb=32 > dev-name ||
-+  skip_ 'failed to create scsi_debug device'
-+scsi_dev=$(cat dev-name)
-+
-+( mkfs.ext4 2>&1 | grep -i '^usage' ) > /dev/null \
-+    || { warn_ "$ME: no ext4 support"; Exit $fail; }
-+
-+parted -s $scsi_dev mklabel msdos mkpart primary ext2 1m 100%
-+mkfs.ext4 ${scsi_dev}1 || { warn_ $ME: mkfs.ext4 failed; fail=1; Exit $fail; }
-+
-+# remove the partition
-+parted -s $scsi_dev rm 1 || fail=1
-+
-+# rescue the partition
-+echo yes | parted ---pretend-input-tty $scsi_dev rescue 1m 100% > out 2>&1
-+cat > exp <<EOF
-+Information: A ext4 primary partition was found at 1049kB -> 33.6MB.  Do you want to add it to the partition table?
-+Yes/No/Cancel? yes
-+Information: You may need to update /etc/fstab.
-+EOF
-+# Transform the actual output, to avoid spurious differences when
-+# $PWD contains a symlink-to-dir.  Also, remove the ^M      ...^M bogosity.
-+# normalize the actual output
-+mv out o2 && sed -e "s,
   *
,,g;s, $,," \
-+                      -e "s,^.*/lt-parted: ,parted: ," o2 > out
-+echo '' >> exp
-+compare out exp || fail=1
-+Exit $fail
--- 
-2.5.5
-
diff --git a/0033-Use-disk-geometry-as-basis-for-ext2-sector-sizes.patch b/0033-Use-disk-geometry-as-basis-for-ext2-sector-sizes.patch
deleted file mode 100644
index 9cb7915..0000000
--- a/0033-Use-disk-geometry-as-basis-for-ext2-sector-sizes.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From ac501e86dd95baa6f426cdd1395f2fe2a9c4e92a Mon Sep 17 00:00:00 2001
-From: Steven Lang <Steven.Lang at hgst.com>
-Date: Thu, 8 Jan 2015 17:22:02 -0800
-Subject: [PATCH 33/36] Use disk geometry as basis for ext2 sector sizes.
-
-When creating the geom for probed ext2 based filesystems, the
-size was being reported in 512 byte sectors, regardless of what
-the actual sector size of the device is.
-
-(cherry picked from commit d15a596a4436a08b9ad9db35729740b6314d536b)
----
- libparted/fs/ext2/interface.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libparted/fs/ext2/interface.c b/libparted/fs/ext2/interface.c
-index 890a47b..a90c592 100644
---- a/libparted/fs/ext2/interface.c
-+++ b/libparted/fs/ext2/interface.c
-@@ -41,7 +41,7 @@ _ext2_generic_probe (PedGeometry* geom, int expect_ext_ver)
- 	struct ext2_super_block *sb = (struct ext2_super_block *)(sb_v + 1024);
- 
- 	if (EXT2_SUPER_MAGIC(*sb) == EXT2_SUPER_MAGIC_CONST) {
--		PedSector block_size = 1 << (EXT2_SUPER_LOG_BLOCK_SIZE(*sb) + 1);
-+		PedSector block_size = (EXT2_MIN_BLOCK_SIZE << (EXT2_SUPER_LOG_BLOCK_SIZE(*sb))) / geom->dev->sector_size;
- 		PedSector block_count = EXT2_SUPER_BLOCKS_COUNT(*sb);
- 		PedSector group_blocks = EXT2_SUPER_BLOCKS_PER_GROUP(*sb);
- 		PedSector group_nr = EXT2_SUPER_BLOCK_GROUP_NR(*sb);
--- 
-2.5.5
-
diff --git a/0034-docs-Add-list-of-filesystems-for-fs-type-1311596.patch b/0034-docs-Add-list-of-filesystems-for-fs-type-1311596.patch
deleted file mode 100644
index 963ef9a..0000000
--- a/0034-docs-Add-list-of-filesystems-for-fs-type-1311596.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d1d40cda51078a5dd8843d8c54e7e112fa028518 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Mon, 29 Feb 2016 16:47:18 -0800
-Subject: [PATCH 34/36] docs: Add list of filesystems for fs-type (#1311596)
-
-Add the most common filesystem types to the parted manpage.
-
-Resolves: rhbz#1311596
-(cherry picked from commit c9f50a36aee0a4c373b5e1bd3069aeb18fac055d)
----
- doc/C/parted.8 | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/doc/C/parted.8 b/doc/C/parted.8
-index 5304375..a45f42f 100644
---- a/doc/C/parted.8
-+++ b/doc/C/parted.8
-@@ -76,6 +76,8 @@ should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos",
- .B mkpart \fIpart-type\fP \fI[fs-type]\fP \fIstart\fP \fIend\fP
- Make a \fIpart-type\fP partition for filesystem \fIfs-type\fP (if specified),
- beginning at \fIstart\fP and ending at \fIend\fP (by default in megabytes).
-+\fIfs-type\fP can be one of "btrfs", "ext2", "ext3", "ext4", "fat16", "fat32",
-+"hfs", "hfs+", "linux-swap", "ntfs", "reiserfs", or "xfs".
- \fIpart-type\fP should be one of "primary", "logical", or "extended".
- .TP
- .B name \fIpartition\fP \fIname\fP
--- 
-2.5.5
-
diff --git a/0035-parted-Display-details-of-partition-alignment-failur.patch b/0035-parted-Display-details-of-partition-alignment-failur.patch
deleted file mode 100644
index ee44397..0000000
--- a/0035-parted-Display-details-of-partition-alignment-failur.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From a7d850a3b39b160dcc23e12491cb2cc7c056cd01 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Wed, 28 Oct 2015 11:57:22 -0700
-Subject: [PATCH 35/36] parted: Display details of partition alignment failure
- (#726856)
-
-When alignment for a new partition fails it isn't always obvious why it
-failed. This adds printing the reason for the failure, in the form of:
-
-start % grain != offset
-
-This modifies align-check in interactive mode to print the alignment the
-error details if it isn't aligned. Script mode behavior is unchanged.
-
-Also cleanup pointer usage and handle asprintf failure by using a constant
-string in the error report - "unknown (malloc failure)".
-
-(cherry picked from commit 1726dbb4cd2dc4b19fe8d3c4b94e172fc0bd2c7c)
----
- parted/parted.c | 64 +++++++++++++++++++++++++++++++++++++++++++++------------
- 1 file changed, 51 insertions(+), 13 deletions(-)
-
-diff --git a/parted/parted.c b/parted/parted.c
-index 18b778c..06f9971 100644
---- a/parted/parted.c
-+++ b/parted/parted.c
-@@ -183,7 +183,8 @@ static TimerContext timer_context;
- static int _print_list ();
- static void _done (PedDevice* dev, PedDisk *diskp);
- static bool partition_align_check (PedDisk const *disk,
--                        PedPartition const *part, enum AlignmentType a_type);
-+                        PedPartition const *part, enum AlignmentType a_type,
-+                        char **align_err);
- 
- static void
- _timer_handler (PedTimer* timer, void* context)
-@@ -783,21 +784,27 @@ do_mkpart (PedDevice** dev, PedDisk** diskp)
-                         }
-                 }
- 
-+                char *align_err = NULL;
-                 if ((alignment == ALIGNMENT_OPTIMAL &&
--                     !partition_align_check(disk, part, PA_OPTIMUM)) ||
-+                     !partition_align_check(disk, part, PA_OPTIMUM, &align_err)) ||
-                     (alignment == ALIGNMENT_MINIMAL &&
--                     !partition_align_check(disk, part, PA_MINIMUM))) {
-+                     !partition_align_check(disk, part, PA_MINIMUM, &align_err))) {
-                         if (ped_exception_throw(
-                                 PED_EXCEPTION_WARNING,
-                                 (opt_script_mode
-                                  ? PED_EXCEPTION_OK
-                                  : PED_EXCEPTION_IGNORE_CANCEL),
-                                 _("The resulting partition is not properly "
--                                  "aligned for best performance.")) ==
-+                                  "aligned for best performance: %s"),
-+                                align_err ? align_err : _("unknown (malloc failed)")) ==
-                             PED_EXCEPTION_CANCEL) {
-+                                if (align_err)
-+                                    free(align_err);
-                                 /* undo partition addition */
-                                 goto error_remove_part;
-                         }
-+                    if (align_err)
-+                        free(align_err);
-                 }
-         } else {
-                 ped_exception_leave_all();
-@@ -1629,10 +1636,18 @@ do_select (PedDevice** dev, PedDisk** diskp)
-    offset and alignment requirements.  Also return true if there is
-    insufficient kernel support to determine DISK's alignment requirements.
-    Otherwise, return false.  A_TYPE selects whether to check for minimal
--   or optimal alignment requirements.  */
-+   or optimal alignment requirements.
-+
-+   If align_err is not NULL a string describing why the check failed
-+   will be allocated and returned. It is up to the caller to free this.
-+   Pass NULL if no error description is needed.
-+
-+   If allocating the error string fails *align_err will be set to NULL, the
-+   caller should always check for this.
-+*/
- static bool
- partition_align_check (PedDisk const *disk, PedPartition const *part,
--		       enum AlignmentType a_type)
-+		       enum AlignmentType a_type, char **align_err)
- {
-   PED_ASSERT (part->disk == disk);
-   PedDevice const *dev = disk->dev;
-@@ -1641,10 +1656,20 @@ partition_align_check (PedDisk const *disk, PedPartition const *part,
- 		      ? ped_device_get_minimum_alignment (dev)
- 		      : ped_device_get_optimum_alignment (dev));
-   if (pa == NULL)
--    return true;
-+      return true;
- 
-   PED_ASSERT (pa->grain_size != 0);
-   bool ok = (part->geom.start % pa->grain_size == pa->offset);
-+
-+  /* If it isn't aligned and the caller wants an explanation,
-+     show them the math.  */
-+  if (!ok && align_err) {
-+      if (asprintf(align_err,
-+                   "%llds %% %llds != %llds",
-+                   part->geom.start, pa->grain_size, pa->offset) < 0) {
-+          *align_err = NULL;
-+      }
-+  }
-   free (pa);
-   return ok;
- }
-@@ -1665,12 +1690,25 @@ do_align_check (PedDevice **dev, PedDisk** diskp)
-   if (!command_line_get_partition (_("Partition number?"), *diskp, &part))
-     goto error;
- 
--  bool aligned = partition_align_check (*diskp, part, align_type);
--  if (!opt_script_mode)
--    printf(aligned ? _("%d aligned\n") : _("%d not aligned\n"), part->num);
--
--  if (opt_script_mode)
--    return aligned ? 1 : 0;
-+  char *align_err = NULL;
-+  bool aligned = partition_align_check (*diskp, part, align_type, &align_err);
-+
-+  /* Don't print the error in script mode */
-+  if (opt_script_mode) {
-+      if (align_err)
-+          free(align_err);
-+      return aligned ? 1 : 0;
-+  }
-+
-+  if (aligned)
-+      printf(_("%d aligned\n"), part->num);
-+  else
-+      printf(_("%d not aligned: %s\n"),
-+             part->num,
-+             align_err ? align_err : _("unknown (malloc failed)"));
-+
-+  if (align_err)
-+      free(align_err);
- 
-   /* Always return 1 in interactive mode, to be consistent
-      with the other modes.  */
--- 
-2.5.5
-
diff --git a/0036-libparted-Remove-fdasd-geometry-code-from-alloc_meta.patch b/0036-libparted-Remove-fdasd-geometry-code-from-alloc_meta.patch
deleted file mode 100644
index 8f47ace..0000000
--- a/0036-libparted-Remove-fdasd-geometry-code-from-alloc_meta.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 02178bf3980410abdd57c9f1045ff27bc4f11d7e Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Mon, 11 Apr 2016 15:10:51 -0700
-Subject: [PATCH 36/36] libparted: Remove fdasd geometry code from
- alloc_metadata (#1244833)
-
-commit db20944f changed how the trailing_metadata_end is calculated in
-dasd_alloc_metadata, removing the need for setting up the anchor struct.
-But dasd_alloc_metadata can be called in various contexts, and the
-arch_specific->fd may or may not be valid during these calls. This can
-result in unpredictable crashes when it uses a stale fd and tries to run
-the file image code in fdasd_get_geometry instead of the device code.
-
-The solution is to just drop the unneeded code, and to remember that
-arch_specific->fd should only be used when ped_device_open has first
-been called.
-
-Resolves: rhbz#1244833
-(cherry picked from commit 9da2f460bebf9a8281fdd52536d3676b0914b8fd)
----
- libparted/labels/dasd.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
-index bb32d66..f79a867 100644
---- a/libparted/labels/dasd.c
-+++ b/libparted/labels/dasd.c
-@@ -948,7 +948,6 @@ dasd_alloc_metadata (PedDisk* disk)
- 	PedPartition* part = NULL; /* initialize solely to placate gcc */
- 	PedPartition* new_part2;
- 	PedSector trailing_meta_start, trailing_meta_end;
--	struct fdasd_anchor anchor;
- 
- 	PED_ASSERT (disk != NULL);
- 	PED_ASSERT (disk->dev != NULL);
-@@ -998,10 +997,7 @@ dasd_alloc_metadata (PedDisk* disk)
- 	      backed up, then restored to a larger size disk, etc.
- 	   */
- 	   trailing_meta_start = part->geom.end + 1;
--	   fdasd_initialize_anchor(&anchor);
--	   fdasd_get_geometry(disk->dev, &anchor, arch_specific->fd);
- 	   trailing_meta_end = (long long) disk->dev->length - 1;
--	   fdasd_cleanup(&anchor);
- 	   if (trailing_meta_end >= trailing_meta_start) {
- 		new_part2 = ped_partition_new (disk,PED_PARTITION_METADATA,
- 		   NULL, trailing_meta_start, trailing_meta_end);
--- 
-2.5.5
-
diff --git a/0037-libparted-Fix-probing-AIX-disks-on-other-arches.patch b/0037-libparted-Fix-probing-AIX-disks-on-other-arches.patch
deleted file mode 100644
index 394d60b..0000000
--- a/0037-libparted-Fix-probing-AIX-disks-on-other-arches.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 85cec179048914d165e3a11b1d8d8c759725d236 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 6 May 2016 14:39:09 -0700
-Subject: [PATCH 37/38] libparted: Fix probing AIX disks on other arches
-
-Not a likely scenario, but make sure the magic check works everywhere.
-
-(cherry picked from commit 24cd71c0a7c4b2abdfff04be5a088a44ab5df2fe)
----
- libparted/labels/aix.c | 18 +++---------------
- 1 file changed, 3 insertions(+), 15 deletions(-)
-
-diff --git a/libparted/labels/aix.c b/libparted/labels/aix.c
-index 0fa6fe7..a831d95 100644
---- a/libparted/labels/aix.c
-+++ b/libparted/labels/aix.c
-@@ -34,23 +34,11 @@
- #  define _(String) (String)
- #endif /* ENABLE_NLS */
- 
--#define	AIX_LABEL_MAGIC		0xc9c2d4c1
-+#define	AIX_LABEL_MAGIC		(0xc9c2d4c1UL)
- #define	MAX_TOTAL_PART		16
- 
- static PedDiskType aix_disk_type;
- 
--static inline int
--aix_label_magic_get (const char *label)
--{
--	return *(unsigned int *)label;
--}
--
--static inline void
--aix_label_magic_set (char *label, int magic_val)
--{
--	*(unsigned int *)label = magic_val;
--}
--
- static int
- aix_probe (const PedDevice *dev)
- {
-@@ -59,9 +47,9 @@ aix_probe (const PedDevice *dev)
- 	void *label;
- 	if (!ptt_read_sector (dev, 0, &label))
- 		return 0;
--	unsigned int magic = aix_label_magic_get (label);
-+	bool found = PED_BE32_TO_CPU(*(uint32_t *)label) == AIX_LABEL_MAGIC;
- 	free (label);
--	return magic == AIX_LABEL_MAGIC;
-+	return found;
- }
- 
- static PedDisk*
--- 
-2.5.5
-
diff --git a/0038-partprobe-Open-the-device-once-for-probing.patch b/0038-partprobe-Open-the-device-once-for-probing.patch
deleted file mode 100644
index 4cd4231..0000000
--- a/0038-partprobe-Open-the-device-once-for-probing.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From f3cbda4bf581b407586f24c980cf2e5a9cb2b4b2 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Wed, 25 May 2016 09:00:04 -0700
-Subject: [PATCH 38/38] partprobe: Open the device once for probing
-
-Previously there were 3 open/close pairs for the device, which may
-result in triggering extra udev actions. Instead, open it once at the
-start of process_dev and close it at the end.
----
- partprobe/partprobe.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c
-index 34997fe..8f2190b 100644
---- a/partprobe/partprobe.c
-+++ b/partprobe/partprobe.c
-@@ -105,6 +105,9 @@ process_dev (PedDevice* dev)
- 	PedDiskType*	disk_type;
- 	PedDisk*	disk;
- 
-+	if (!ped_device_open (dev))
-+		return 0;
-+
- 	disk_type = ped_disk_probe (dev);
- 	if (!disk_type) {
- 		/* Partition table not found, so create dummy,
-@@ -128,11 +131,13 @@ process_dev (PedDevice* dev)
- 	if (opt_summary)
- 		summary (disk);
- 	ped_disk_destroy (disk);
-+	ped_device_close (dev);
- 	return 1;
- 
- error_destroy_disk:
- 	ped_disk_destroy (disk);
- error:
-+	ped_device_close (dev);
- 	return 0;
- }
- 
--- 
-2.5.5
-
diff --git a/0039-Cleanup-mkpart-manpage-entry-1183077.patch b/0039-Cleanup-mkpart-manpage-entry-1183077.patch
deleted file mode 100644
index e3798eb..0000000
--- a/0039-Cleanup-mkpart-manpage-entry-1183077.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From a5a64f34ca3d64c4da04ed6e870d4c8e469c6098 Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Thu, 5 Nov 2015 15:03:54 -0800
-Subject: [PATCH 39/40] Cleanup mkpart manpage entry (#1183077)
-
-(cherry picked from commit fa6cd8448f68e6661fb86a8331b44198edd02c9d)
----
- doc/C/parted.8  | 8 ++++----
- doc/parted.texi | 2 +-
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/doc/C/parted.8 b/doc/C/parted.8
-index a45f42f..41baa1a 100644
---- a/doc/C/parted.8
-+++ b/doc/C/parted.8
-@@ -73,12 +73,12 @@ Create a new disklabel (partition table) of \fIlabel-type\fP.  \fIlabel-type\fP
- should be one of "aix", "amiga", "bsd", "dvh", "gpt", "loop", "mac", "msdos",
- "pc98", or "sun".
- .TP
--.B mkpart \fIpart-type\fP \fI[fs-type]\fP \fIstart\fP \fIend\fP
--Make a \fIpart-type\fP partition for filesystem \fIfs-type\fP (if specified),
--beginning at \fIstart\fP and ending at \fIend\fP (by default in megabytes).
-+.B mkpart [\fIpart-type\fP \fIname\fP \fIfs-type\fP] \fIstart\fP \fIend\fP
-+Create a new partition. \fIpart-type\fP may be specified only with msdos and
-+dvh partition tables, it should be one of "primary", "logical", or "extended".
-+\fIname\fP is required for GPT partition tables and \fIfs-type\fP is optional.
- \fIfs-type\fP can be one of "btrfs", "ext2", "ext3", "ext4", "fat16", "fat32",
- "hfs", "hfs+", "linux-swap", "ntfs", "reiserfs", or "xfs".
--\fIpart-type\fP should be one of "primary", "logical", or "extended".
- .TP
- .B name \fIpartition\fP \fIname\fP
- Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
-diff --git a/doc/parted.texi b/doc/parted.texi
-index 07aa702..c727fb2 100644
---- a/doc/parted.texi
-+++ b/doc/parted.texi
-@@ -550,7 +550,7 @@ PCs.
- @cindex mkpart, command description
- @cindex command description, mkpart
- 
-- at deffn Command mkpart [@var{part-type} @var{fs-type} @var{name}] @var{start} @var{end}
-+ at deffn Command mkpart [@var{part-type} @var{name} @var{fs-type}] @var{start} @var{end}
- 
- Creates a new partition, @emph{without} creating a new file system on
- that partition.  This is useful for creating partitions for file systems
--- 
-2.5.5
-
diff --git a/0040-doc-Add-information-about-quoting.patch b/0040-doc-Add-information-about-quoting.patch
deleted file mode 100644
index a5ff968..0000000
--- a/0040-doc-Add-information-about-quoting.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From fd311a9367ec342b7d1fa5265f4d2167a29de30d Mon Sep 17 00:00:00 2001
-From: "Brian C. Lane" <bcl at redhat.com>
-Date: Fri, 6 Nov 2015 08:56:45 -0800
-Subject: [PATCH 40/40] doc: Add information about quoting
-
-Some shells (bash) will strip off the " so it needs to be
-wrapped in '' to prevent it. eg.
-
-parted -s ./disk.img mkpart '"EFI System Partition"' 1M 500M
-
-(cherry picked from commit 8d5e7329a6984614ac9951f376bc77ea7f822ca3)
----
- doc/C/parted.8  | 4 +++-
- doc/parted.texi | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/doc/C/parted.8 b/doc/C/parted.8
-index 41baa1a..eb7cd98 100644
---- a/doc/C/parted.8
-+++ b/doc/C/parted.8
-@@ -82,7 +82,9 @@ dvh partition tables, it should be one of "primary", "logical", or "extended".
- .TP
- .B name \fIpartition\fP \fIname\fP
- Set the name of \fIpartition\fP to \fIname\fP. This option works only on Mac,
--PC98, and GPT disklabels. The name can be placed in quotes, if necessary.
-+PC98, and GPT disklabels. The name can be placed in double quotes, if necessary.
-+And depending on the shell may need to also be wrapped in single quotes so that
-+the shell doesn't strip off the double quotes.
- .TP
- .B print
- Display the partition table.
-diff --git a/doc/parted.texi b/doc/parted.texi
-index c727fb2..1b9c084 100644
---- a/doc/parted.texi
-+++ b/doc/parted.texi
-@@ -628,7 +628,9 @@ $ @kbd{mkfs.vfat /dev/sdX2}
- @deffn Command name @var{number} @var{name}
- 
- Sets the name for the partition @var{number} (GPT, Mac, MIPS and PC98 only).
--The name can be placed in quotes.
-+The name can be placed in quotes. And depending on the shell may need to also
-+be wrapped in single quotes so that the shell doesn't strip off the double
-+quotes.
- 
- Example:
- 
--- 
-2.5.5
-
diff --git a/0041-libparted-dasd-correct-the-offset-where-the-first-pa.patch b/0041-libparted-dasd-correct-the-offset-where-the-first-pa.patch
deleted file mode 100644
index c56f7f6..0000000
--- a/0041-libparted-dasd-correct-the-offset-where-the-first-pa.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 40270928ff4ac2a87825f47e53c680ffb18b5bc4 Mon Sep 17 00:00:00 2001
-From: Wang Dong <dongdwdw at linux.vnet.ibm.com>
-Date: Tue, 14 Jun 2016 12:19:40 +0200
-Subject: [PATCH 41/53] libparted/dasd: correct the offset where the first
- partition begins
-
-The start point of first partition must start at least from the third
-track of DASD, due to the existence of metadata in the first two track.
-The previous constraint just sets all the device to be partitioned.
-So when the start point of the first partition start before the third
-track, (For example if it starts from.0) parted will exit abruptly.
-And this kind of job must be done with constraint explicitly.
-
-Then the constraint is modified to exclude the first two tracks and
-to make the first partition start from the third track by default.
-
-Signed-off-by: Wang Dong <dongdwdw at linux.vnet.ibm.com>
-Reviewed-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
-Signed-off-by: Hendrik Brueckner <brueckner at linux.vnet.ibm.com>
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
-(cherry picked from commit 4126d0292c75cf7d50a2f4e9d485a52b5beafccc)
----
- libparted/labels/dasd.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/libparted/labels/dasd.c b/libparted/labels/dasd.c
-index f79a867..4e68512 100644
---- a/libparted/labels/dasd.c
-+++ b/libparted/labels/dasd.c
-@@ -829,6 +829,7 @@ _primary_constraint (PedDisk* disk)
- 	PedSector sector_size;
- 	LinuxSpecific* arch_specific;
- 	DasdDiskSpecific* disk_specific;
-+	PedSector start;
- 
- 	PDEBUG;
- 
-@@ -842,7 +843,12 @@ _primary_constraint (PedDisk* disk)
- 	if (!ped_alignment_init (&end_align, -1,
- 						     disk->dev->hw_geom.sectors * sector_size))
- 		return NULL;
--	if (!ped_geometry_init (&max_geom, disk->dev, 0, disk->dev->length))
-+
-+	start = (FIRST_USABLE_TRK * (long long) disk->dev->hw_geom.sectors
-+			    * (long long) arch_specific->real_sector_size
-+			    / (long long) disk->dev->sector_size);
-+
-+	if (!ped_geometry_init (&max_geom, disk->dev, start, disk->dev->length))
- 		return NULL;
- 
- 	return ped_constraint_new(&start_align, &end_align, &max_geom,
--- 
-2.7.4
-
diff --git a/0042-Add-support-for-NVMe-devices.patch b/0042-Add-support-for-NVMe-devices.patch
deleted file mode 100644
index 0abce18..0000000
--- a/0042-Add-support-for-NVMe-devices.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 797d7b90c677e49552fbe7c526ce849b964e1ffe Mon Sep 17 00:00:00 2001
-From: Petr Uzel <petr.uzel at suse.cz>
-Date: Tue, 14 Jun 2016 13:17:00 +0200
-Subject: [PATCH 42/53] Add support for NVMe devices
-
-Recognize NVMe Devices, so "parted -s /dev/nvme0n1" now prints
-"NVMe Device (nvme)" instead of "Model: Unknown (unknown)".
-
-In order for a device to be recognized as NVMe, it has to
-have a 'blkext' major number. But since this major can be
-used also by other device types, we also check the device
-path contains 'nvme' as a substring.
-
-* NEWS: Mention the change
-* include/parted/device.h.in(PedDeviceType): Add PED_DEVICE_NVME
-* libparted/arch/linux.c(BLKEXT_MAJOR): New define.
-* libparted/arch/linux.c(_is_blkext_major): New function.
-* libparted/arch/linux.c(_device_probe_type): Recognize NVMe devices.
-* libparted/arch/linux.c(linux_new): Handle NVMe devices.
-* parted/parted.c(do_print): Add "nvme" to list of transports.
-
-Signed-off-by: Brian C. Lane <bcl at redhat.com>
-(cherry picked from commit e4ae4330f3e33201aeeed3b7ca88e15d98d03e13)
----
- include/parted/device.in.h |  3 ++-
- libparted/arch/linux.c     | 14 ++++++++++++++
- parted/parted.c            |  2 +-
- 3 files changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/include/parted/device.in.h b/include/parted/device.in.h
-index 82d4104..d38db44 100644
---- a/include/parted/device.in.h
-+++ b/include/parted/device.in.h
-@@ -49,7 +49,8 @@ typedef enum {
-         PED_DEVICE_VIRTBLK      = 15,
-         PED_DEVICE_AOE          = 16,
-         PED_DEVICE_MD           = 17,
--        PED_DEVICE_LOOP         = 18
-+        PED_DEVICE_LOOP         = 18,
-+        PED_DEVICE_NVME         = 19
- } PedDeviceType;
- 
- typedef struct _PedDevice PedDevice;
-diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
-index eb01deb..b7ba5de 100644
---- a/libparted/arch/linux.c
-+++ b/libparted/arch/linux.c
-@@ -278,6 +278,7 @@ struct blkdev_ioctl_param {
- #define SDMMC_MAJOR             179
- #define LOOP_MAJOR              7
- #define MD_MAJOR                9
-+#define BLKEXT_MAJOR            259
- 
- #define SCSI_BLK_MAJOR(M) (                                             \
-                 (M) == SCSI_DISK0_MAJOR                                 \
-@@ -441,6 +442,12 @@ _is_virtblk_major (int major)
-         return _major_type_in_devices (major, "virtblk");
- }
- 
-+static int
-+_is_blkext_major (int major)
-+{
-+        return _major_type_in_devices (major, "blkext");
-+}
-+
- #ifdef ENABLE_DEVICE_MAPPER
- static int
- _dm_task_run_wait (struct dm_task *task, uint32_t cookie)
-@@ -692,6 +699,8 @@ _device_probe_type (PedDevice* dev)
-                 dev->type = PED_DEVICE_LOOP;
-         } else if (dev_major == MD_MAJOR) {
-                 dev->type = PED_DEVICE_MD;
-+        } else if (_is_blkext_major(dev_major) && dev->path && strstr(dev->path, "nvme")) {
-+                dev->type = PED_DEVICE_NVME;
-         } else {
-                 dev->type = PED_DEVICE_UNKNOWN;
-         }
-@@ -1465,6 +1474,11 @@ linux_new (const char* path)
-                         goto error_free_arch_specific;
-                 break;
- 
-+        case PED_DEVICE_NVME:
-+                if (!init_generic (dev, _("NVMe Device")))
-+                        goto error_free_arch_specific;
-+                break;
-+
-         case PED_DEVICE_ATARAID:
-                 if (!init_generic (dev, _("ATARAID Controller")))
-                         goto error_free_arch_specific;
-diff --git a/parted/parted.c b/parted/parted.c
-index 06f9971..bd848c3 100644
---- a/parted/parted.c
-+++ b/parted/parted.c
-@@ -979,7 +979,7 @@ _print_disk_info (const PedDevice *dev, const PedDisk *diskp)
-                                          "cpqarray", "file", "ataraid", "i2o",
-                                          "ubd", "dasd", "viodasd", "sx8", "dm",
-                                          "xvd", "sd/mmc", "virtblk", "aoe",
--                                         "md", "loopback"};
-+                                         "md", "loopback", "nvme"};
- 
-         char* start = ped_unit_format (dev, 0);
-         PedUnit default_unit = ped_unit_get_default ();
--- 
-2.7.4
-
diff --git a/0043-docs-Improve-partition-description-in-parted.texi.patch b/0043-docs-Improve-partition-description-in-parted.texi.patch
deleted file mode 100644
index 30052d5..0000000
--- a/0043-docs-Improve-partition-description-in-parted.texi.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 22a2fd360f5f0f8e7e522712a6187b1c6ac74ba7 Mon Sep 17 00:00:00 2001
-From: Gareth Randall <gareth.randall at virgin.net>
-Date: Fri, 30 Sep 2016 10:07:42 -0700
-Subject: [PATCH 43/53] docs: Improve partition description in parted.texi
-
-(cherry picked from commit e27ac8ff6706f67817f68246311899bd920b9c88)
----
- doc/parted.texi | 36 +++++++++++++++++++++++++++++++-----
- 1 file changed, 31 insertions(+), 5 deletions(-)
-
-diff --git a/doc/parted.texi b/doc/parted.texi
-index 1b9c084..414179d 100644
---- a/doc/parted.texi
-+++ b/doc/parted.texi
-@@ -291,12 +291,38 @@ or you want to modify a root or boot partition, use GParted Live:
- @section Introduction to Partitioning
- @cindex partitioning overview
- 
--Unfortunately, partitioning your disk is rather complicated.  This is
--because there are interactions between many different systems that need
--to be taken into consideration.
-+Partitioning is the process of dividing a storage device into local
-+sections, called partitions, which help organize multiple filesystems
-+and their associated operating systems.
-+
-+A storage device presents itself as a sequence of bytes, numbered
-+starting from zero and increasing until the maximum capacity of the
-+device is reached. Bytes are normally read and written a sector at a
-+time, rather than individually. Each sector contains a fixed number
-+of bytes, with the number determined by the device.
-+
-+ at example
-++------------------------------------------------------------+
-+|            storage device with no partitions               |
-++------------------------------------------------------------+
-+0 start                                                    end
-+ at end example
-+
-+In order to store multiple filesystems, a storage device can be divided
-+up in to multiple partitions. Each partition can be thought of as an
-+area which contains a real filesystem inside of it. To show where these
-+partitions are on the device a small table is written at the start,
-+shown as PT in the diagram below. This table is called a partition
-+table, or disklabel, and also stores the type of each partition and
-+some flags.
-+
-+ at example
-++--+---------------+----------------+------------------------+
-+|PT|  Partition 1  |  Partition 2   |  Partition 3           |
-++--+---------------+----------------+------------------------+
-+0 start                                                    end
-+ at end example
- 
--This manual used to introduce the reader to these systems and their
--working.  This content has moved to the GNU Storage Guide.
- 
- @node Running Parted
- @section Using GNU Parted
--- 
-2.7.4
-
diff --git a/0044-libparted-only-IEC-units-are-treated-as-exact.patch b/0044-libparted-only-IEC-units-are-treated-as-exact.patch
deleted file mode 100644
index cdf1084..0000000
--- a/0044-libparted-only-IEC-units-are-treated-as-exact.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From e4bf9b823452c0b98b394b8abcc67f887b6991b3 Mon Sep 17 00:00:00 2001
-From: Petr Uzel <petr.uzel at suse.cz>
-Date: Thu, 21 Jul 2016 16:46:46 +0200
<Skipped 7706 lines>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/parted.git/commitdiff/9b28765b41adee7f466d8888de295eafb54832a0



More information about the pld-cvs-commit mailing list