From 58214a8e187859839386f1c8a46842f046f828a5c2cc7b045c033dd9c2e6c2dd Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Tue, 5 May 2015 14:11:46 +0000 Subject: [PATCH] - Do not warn about shrinking a partition if script mode is used (bnc#929189) - add: parted-do-not-warn-when-shrinking-in-script-mode.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=112 --- ...not-warn-when-shrinking-in-script-mode.patch | 17 +++++++++++++++++ parted.changes | 7 +++++++ parted.spec | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 parted-do-not-warn-when-shrinking-in-script-mode.patch diff --git a/parted-do-not-warn-when-shrinking-in-script-mode.patch b/parted-do-not-warn-when-shrinking-in-script-mode.patch new file mode 100644 index 0000000..71f8cd7 --- /dev/null +++ b/parted-do-not-warn-when-shrinking-in-script-mode.patch @@ -0,0 +1,17 @@ +--- + parted/parted.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: parted-3.2/parted/parted.c +=================================================================== +--- parted-3.2.orig/parted/parted.c ++++ parted-3.2/parted/parted.c +@@ -1601,7 +1601,7 @@ do_resizepart (PedDevice** dev, PedDisk* + start, end)) + goto error_destroy_constraint; + /* warn when shrinking partition - might lose data */ +- if (part->geom.end < oldend) ++ if ((part->geom.end < oldend) && !opt_script_mode) + if (ped_exception_throw ( + PED_EXCEPTION_WARNING, + PED_EXCEPTION_YES_NO, diff --git a/parted.changes b/parted.changes index 41e2130..9e0693f 100644 --- a/parted.changes +++ b/parted.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 5 13:39:24 UTC 2015 - puzel@suse.com + +- Do not warn about shrinking a partition if script mode is used + (bnc#929189) + - add: parted-do-not-warn-when-shrinking-in-script-mode.patch + ------------------------------------------------------------------- Wed Feb 11 15:01:56 UTC 2015 - puzel@suse.com diff --git a/parted.spec b/parted.spec index 1285fb6..7208a8c 100644 --- a/parted.spec +++ b/parted.spec @@ -54,6 +54,7 @@ Patch27: parted-dont-crash-in-disk_set-when-disk-label-not-found.patch Patch28: libparted-device-mapper-uses-512b-sectors.patch Patch29: parted-resize-alias-to-resizepart.patch Patch30: libparted-avoid-libdevice-mapper-warnings.patch +Patch31: parted-do-not-warn-when-shrinking-in-script-mode.patch Patch100: parted-fatresize-autoconf.patch Requires: /sbin/udevadm BuildRequires: check-devel @@ -128,6 +129,7 @@ to develop applications that require these. %patch28 -p1 %patch29 -p1 %patch30 -p1 +%patch31 -p1 %patch100 -p1 %build