[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GPT name overflow

From: Andreas Dilger
Subject: Re: GPT name overflow
Date: Sun, 10 Mar 2002 14:40:02 -0700
User-agent: Mutt/1.3.27i

On Mar 10, 2002  08:31 +1100, Andrew Clausen wrote:
> On Sat, Mar 09, 2002 at 01:49:42PM -0700, Andreas Dilger wrote:
> > > However, parted has no way of representing anything other
> > > than file systems (via PedFileSystem).  It should.  *That* is what
> > > should be fixed, IMHO.  However, I don't really have any ideas yet
> > > on how to do this Right.
> > 
> > I can't remember - did I send you my "named partition types" patch?  It
> > adds "useful" names to partition types, like "linux", "swap", "raid",
> > etc.
> I don't think so.  I think I only got a "replace magic numbers with
> #defines for msdos" patch.

Yes, that was the pre-req of the "named partition types" patch (because
I use the symbolic names a lot in the latter patch.

> So, how does it add "useful" names?  Is it 1-1 with each number?
> Is there a different name for each partition table type?

It is _mostly_ a 1-1 mapping of partition type numbers to names, but not
strictly so.  For example, there is a "linux" type for each disk type
which maps to the correct numeric value/UUID/name (for Mac).  In some
cases, there are multiple names which map to the same type (it picks the
first name matching a number on number->name lookups).  For example, on
GPT disks the "linux" and "data" types both map to the same UUID.

There is also the facility to use "names" of the form "type-<value>" in
case a given value is not supported (I don't have names for _all_ of the
MSDOS types).  This at least will give you _some_ useful output instead
of "unknown", and allows you to input unsopported types if you really
need it.  However, that is a last resort.

Patch is attached so you can look at it.

Cheers, Andreas
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

Attachment: patch-1.6.0p2-ptype.diff
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]