[parted-devel] [PATCH] Properly sync partitions with operating system

Joel Granados jgranado at redhat.com
Thu Feb 19 14:05:41 UTC 2009


On Thu, Feb 19, 2009 at 07:08:16AM -0600, Matt Domsch wrote:
> On Thu, Feb 19, 2009 at 12:28:14PM +0100, Petr Uzel wrote:
> > On Wed, Feb 18, 2009 at 10:01:11PM +0100, Joel Granados Moreno wrote:
> > > diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
> > > index eea562d..6c9929b 100644
> > > --- a/libparted/labels/gpt.c
> > > +++ b/libparted/labels/gpt.c
> > > @@ -1470,6 +1470,12 @@ gpt_get_max_primary_partition_count (const PedDisk *disk)
> > >  	return gpt_disk_data->entry_count;
> > >  }
> > >  
> > > +static int
> > > +gpt_get_max_partitoin_count(const PedDisk *disk)
> > > +{
> > > +	return 16;
> > > +}
> > > +
> > 
> > Are you sure about this? I think GPT has no such on the number of
> > partitions.
> 
> In fact GPT by default (and in parted implementation) has 128
> partition entry slots.  In theory this can be adjusted upwards at
> mklabel time (simply reserve additional blocks into which the entries
> will go).

For the gpt case I think it is best to make
gpt_get_max_primary_partitions_count and gpt_get_max_partition_count
return whatever gpt_get_max_primary_partitoin_count.

There are no other type of partitions in gpt.  right?

> 
> also note s/partitoin/partition/, both here and in mac.c.
> 
> Thanks,
> Matt
> 
> -- 
> Matt Domsch
> Linux Technology Strategist, Dell Office of the CTO
> linux.dell.com & www.dell.com/linux
> 
> _______________________________________________
> parted-devel mailing list
> parted-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/parted-devel

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.



More information about the parted-devel mailing list