How to get the partition number of a GPT partition from the
geom?
Marius Nünnerich
marius at nuenneri.ch
Mon Oct 20 20:21:39 UTC 2008
On Mon, Oct 20, 2008 at 9:45 PM, Marius Nünnerich <marius at nuenneri.ch> wrote:
> Hi Marcel,
>
> thanks for your reply.
>
> On Mon, Oct 20, 2008 at 9:09 PM, Marcel Moolenaar <xcllnt at mac.com> wrote:
>>
>> On Oct 20, 2008, at 10:55 AM, Marius Nünnerich wrote:
>>
>>> A new question popped up:
>>> Is it possible to test the a geom of class PART is of "subclass" GPT?
>>
>>
>> Not easily from the kernel now, but it's always possible to make
>> certain bits of information more readily available for use inside
>> the kernel.
>>
>> It seems to make sense to have GEOMs export label information
>> through g_getattr(). This allows the label to come from every
>> GEOM that possibly can have labels, without the need to add
>> explicit support...
>
> That would certainly be a clean thing to do.
> I'll take a look into g_getattr() now, thanks.
Hmm, this would not really help for GPT, since I would also like to
have the partition uuid, so another attr would be needed. BIO_GETATTR
is handled in g_part.c so the specific implementations never see the
request. For example MBR has no label or uuid so it doesn't make sense
to ask it for one.
Is there some documentation why gpart was started and what it's main
advantages are over the old style?
More information about the freebsd-geom
mailing list