[parted-devel] [PATCH] Properly sync partitions with operating system
Jim Meyering
jim at meyering.net
Tue Feb 24 17:46:50 UTC 2009
Joel Granados wrote:
...
> I could calculated with the values that parted uses but that would
> ignore the fact that other apps also create gpt partitions.
>
> In other words we have three choices:
> 1. call ioctl 36893488147419103224 times to make sure that we cover *all*
> the partitions
> 2. we read the partition header and calculate just how many partitions
> this table can hold.
> 3. We randomly guess a number and work with that.
>
> I prefer 2, adding Jim's suggestion of modifying the way the functions
> return an error. I can live with 3, guess we just need to arbitrarily
> decide on the value. 1 just sounds outrageous.
#2 sounds fine, now.
> Jim:
> Whats wrong with reading the device?
Nothing, now that it's clear that it's required.
Thanks for investigating.
BTW, while this process might make you think of the
recently overused "lipstick on a pig" expression,
I prefer to think of it as setting an example for
the types of changes we should be making to parted.
More information about the parted-devel
mailing list