[parted-devel] problem about the partition commit

Wang Dong dongdwdw at linux.vnet.ibm.com
Mon Feb 6 03:02:05 UTC 2017



On 02/01/2017 03:06 AM, Phil Susi wrote:
> On 6/18/2016 12:38 AM, Wang Dong wrote:
>> Hi,
>>
>> I read the parted.c and got a question about function *do_mkpart.*
>>
>> Any errors from the low level will result in fail of function
>> *ped_disk_commit,*
>>
>> then *do_mkpart* will jump directly to label*error*, without processing
>> the new part info in memory.
>>
>> Why not just remove the new part info but leave it untouched?
>>
>> I can get it if parted in script mode, then this may not affect much,
>> because parted will exit at once with fail.
>>
>> but if it is in interactive mode, user still can see the part info, this
>> will be confusing.
>>
>>
>> The same situation exists in *ped_device_set_system*.
>>
>> I think these two function should jump to label *error_remove_part* not
>> just label *error* once they fail.
>>
>> Is this OK? Or something I missed. Any comments will be appreciated.
>> Thanks in advance.
> I think so, good catch!
>
>
>
Hi,

I have created a patch for this issue.
You could find the patches in the maillist.
If possible I am very glad to receive your comments.

-- 
Best regards. Wang Dong




More information about the parted-devel mailing list