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

Sebastian Parschauer sparschauer at suse.de
Mon Nov 13 17:06:01 UTC 2017


On 13.11.2017 17:21, Phil Susi wrote:
> On 11/7/2017 11:23 AM, Sebastian Parschauer wrote:
>>          if (ped_partition_is_busy (part)) {
>>                  path = ped_partition_get_path (part);
>> -                if (ped_exception_throw (
>> +                if (opt_script_mode && (!dangerous || force)) {
>> +                        ped_exception_throw (
>> +                            PED_EXCEPTION_WARNING,
>> +                            PED_EXCEPTION_UNHANDLED,
>> +                            _("Partition %s is being used, continuing anyway."),
> 
> I think that it would be preferable here to keep the existing string and
> just accept a result of PED_EXCEPTION_UNHANDLED when force is true.
> That way we don't need to get new translations.

Then it is not really visible in a log any more that it has been ignored
that the partition is busy. I'm against this. Rather an untranslated
message than a confusing one.

> 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 think the latter will also be handed by just allowing
> PED_EXCEPTION_UNHANDLED as a result of the otherwise YES/NO exception.

I'm starting to lose patience here as this bug becomes urgent on my side
and I basically only need the interface for YaST to be properly defined
now. I'm inclined to use a custom patch for now and to keep upstream
broken until we can agree on a final solution which doesn't change that
interface any more.

Are you also fine with "--ignore-busy"?

I'm fine if we only discuss about adding tests and how the printed
warning should look like from now on.

Thanks in advance!

Cheers,
Sebastian



More information about the parted-devel mailing list