[parted-devel] [PATCH v3 2/2] parted: Fix resizepart and rm command
Phil Susi
psusi at ubuntu.com
Mon Nov 13 16:21:16 UTC 2017
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.
Also it looks like this means that even an interactive user will never
he 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?
I think the latter will also be handed by just allowing
PED_EXCEPTION_UNHANDLED as a result of the otherwise YES/NO exception.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20171113/a0a63e9c/attachment.sig>
More information about the parted-devel
mailing list