[parted-devel] [PATCH] parted: Display details of partition alignment failure (#726856)
Phil Susi
psusi at ubuntu.com
Wed Feb 10 15:47:09 UTC 2016
First, sorry for the late reply; I seem to have fallen off the mailing
list some time ago. Also please take your misguided mail client's
reply-to-list function and drown it in the bathtub. Reply-to-all is the
correct way to reply to public discussions. Had you done this I still
would have seen this message long ago.
On 12/16/2015 5:52 PM, Brian C. Lane wrote:
> I took another look at this, and still disagree. do_mkpart throws
> exceptions in a couple of places based on results from the attempt to
> make the partition. There is also another use of partition_align_check
So?
> in do_align_check where it doesn't throw an exception. Moving these
> exceptions down into a function doesn't make sense.
Hrm... it seems that if you want to get the reason in do_mkpart, you
would also want to get it in do_align_check. That is; this function
should also be printing the reason rather than passing NULL. Proper
exception practice still says the exception should be pushed down to
where the actual error is detected, but on the other hand,
do_align_check wants to just print the result rather than process it as
an exception and so it would have to catch it and work harder to print
it as a regular message instead of as an error due to the wonky nature
of libparted's makeshift C exceptions rather than having proper C++ or
SEH exception handling.
Due to that and the fact that none of these functions are part of
libparted, I suppose the string argument is ok, but it seems that it
should also be added to do_align_check, don't you think?
More information about the parted-devel
mailing list