[parted-devel] [PATCH] Always allow at least two sectors for extended boot record

Jim Meyering jim at meyering.net
Wed Apr 21 20:50:14 UTC 2010


Phillip Susi wrote:
> On 4/18/2010 5:29 AM, Jim Meyering wrote:
>> I've made some changes, and along the way some tests have failed
>> due to new semantics and new warnings.
>>
>> I've pushed touched-up versions of your changes to a new, temporary
>> "next" branch
>>
>>   http://git.debian.org/?p=parted/parted.git;a=shortlog;h=refs/heads/next
>
> Looks unchanged to me.

I changed at least the log messages.

>> One change to semantics is to adjust the warning so that it
>> makes parted exit nonzero.  Given that, perhaps the message should
>> start with "Error".
>
> You mean the warning about other partitions not being able to be
> modified?  I was wondering about that.  If you are not planning on
> making further changes then you can ignore the warning since it does not
> effect the partition you just changed, so changing it to an error does
> not seem justified.

IMHO, parted should err on the side of safety.
Imagine a script getting the warning.  It should not
have to parse stderr to determine that it must not proceed.

> Maybe something other than PED_EXCEPTION_IGNORE
> should be used?  Perhaps ignore or fail?

BTW, wouldn't this diagnostic do better to say how we've failed
to notify the kernel of changes that we've written to disk?

+        if (parts[0]) {
+                parts[strlen (parts) - 2] = 0;
+                ped_exception_throw (
+                        PED_EXCEPTION_WARNING,
+                        PED_EXCEPTION_IGNORE,
+                        _("Partition(s) %s on %s could not be modified, probably "
+                          "because it/they is/are in use.  As a result, the old partition(s) "
+                          "will remain in use until after reboot. You should reboot "
+                          "now before making further changes."),
+                        parts, disk->dev->path);
+        }



More information about the parted-devel mailing list