[parted-devel] [PATCH v3 2/2] parted: Fix resizepart and rm command

Sebastian Parschauer sparschauer at suse.de
Mon Nov 13 18:10:38 UTC 2017


On 13.11.2017 18:36, Phil Susi wrote:
>>> Also it looks like this means that even an interactive user will never
>>> be asked if they meant to resize a busy partition.  On the one hand, why
>>> bother printing the warning at all then?  And on the other, shouldn't we
>>> still be asking the interactive user if they really meant to do this?
>>
>> You've answered yourself here why your proposal has side effects.
>> My patch does that correctly.
> 
> I'm not sure if I understand you correctly.  Your patch makes the
> warning print, but not wait for user input when resizing a busy
> partition.  That is undesirable.

In interactive mode nothing is changed with my patch regarding the busy
partition warning. It prints the question and reacts on yes/no answers.

-                if (ped_exception_throw (
+                if (opt_script_mode && (!dangerous || force)) {
...  new code for script mode only
+                } else if (ped_exception_throw (

Here in interactive mode it does what it did before.

In script mode the question is printed and 'no' is assumed when --force
(or in future --ignore-busy) is not set. If it is set, then it prints a
more meaningful warning for that case and continues anyway as this is
what's requested by setting that option.



More information about the parted-devel mailing list