[parted-devel] [PATCH] parted: Fix resizepart command

Sebastian Parschauer sparschauer at suse.de
Wed Sep 20 14:51:13 UTC 2017


On 20.09.2017 14:49, Phil Susi wrote:
> On 9/20/2017 5:37 AM, Sebastian Parschauer wrote:
>> The resizepart command does not work properly with busy partitions,
>> neither in interactive nor script mode.
>> The check and the warning for that are located in the middle of
>> parameter checking and parted asks for the partition end again. So
>> move that after parameter checking.
> 
> How is that?  If the busy warning failed, it jumps to the error label
> and does *not* ask for the end.  Also it never asked for it in the first
> place since the warning comes before asking for the end, so I don't
> understand why you said that it asks for it a second time.

Okay, it is only in the 'Yes' case and I mean that parted asks for the
end although it has been provided on the command line already.

# parted /dev/sda resizepart 1 100%
Warning: Partition /dev/sda1 is being used. Are you sure you want to
continue?
Yes/No? yes
End? [2147MB]?

Okay, the patch description has to be reworked in this regard.

What about this?:

"The check and the warning for that are located in the middle of
parameter checking. If telling parted to continue anyways, then it asks
for the partition end although it has been provided as a parameter
already. So move that after parameter checking."



More information about the parted-devel mailing list