[parted-devel] problem about the partition commit

Phil Susi psusi at ubuntu.com
Tue Jan 31 19:06:31 UTC 2017


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!





More information about the parted-devel mailing list