[parted-devel] [PATCH] Properly sync partitions with operating system
jgranado at redhat.com
Tue Feb 24 18:55:44 UTC 2009
On Tue, Feb 24, 2009 at 06:46:50PM +0100, Jim Meyering wrote:
> 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.
Yep, I'm reworking the patch to include the calculation and to change
the way we return from the function.
> > 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.
Note that while I had access to the gpt spec, I'm probably not going to
have access to all of them, So we might need to guess in some of them.
Joel Andres Granados
Brno, Czech Republic, Red Hat.
More information about the parted-devel