Subject: Re: bug#20225: Email bug report because web-based bug tracking tool is down

From: Phillip Susi <[email-masked]>
Date: Mon, 30 Mar 2015 16:12:44 -0400

I'm not sure this isn't actually intentional.  What should parted do
when run in scripting mode?  There all exceptions are unhandled, so a
sane default action must be taken.  I think this particular error
really should be a warning, and the default is to proceed, using the
backup copy.

On 3/30/2015 12:42 PM, Brian C. Lane wrote:
> On Sun, Mar 29, 2015 at 01:09:04PM +0000, Nugent, Bill wrote:
>> In case I forget I wanted to report a bug with parted where
>> Control-C is treated as an OK response.  I was testing how parted
>> handled a corrupt primary GPT and was rewarded with parted asking
>> if I wanted to use the backup GPT instead with the prompt:
>> "OK/Cancel? " I typed Control-C and it took it as an OK
>> response.
>> 
>> 
>> $ parted fu print unit s print unit chs print
>> 
>> WARNING: You are not superuser.  Watch out for permissions.
>> 
>> Error: The primary GPT table is corrupt, but the backup appears
>> OK, so that will be used.
>> 
>> parted: invalid token: unit
>> 
>> OK/Cancel? ^C
>> 
>> Model:  (file)
>> 
>> Disk /path/to/changed/fu: 4001GB
>> 
>> Sector size (logical/physical): 512B/512B
>> 
>> Partition Table: gpt
> 
> Thanks for the report, it looks like we've got some places where 
> ped_exception_throw return values aren't being checked properly --
> ^C should generate a PED_EXCEPTION_UNHANDLED and I see a number of
> places that don't take that into account.
>