parted/parted-do-not-warn-when-shrinking-in-script-mode.patch
2015-05-05 14:11:46 +00:00

18 lines
722 B
Diff

---
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,