Implement (non-bootable) GPT support. If a PMBR partition type is detected
commit1bdc85cd74f3c08d55bdd4fc2f8f95557eaee271
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 17 Jun 2007 03:51:14 +0000 (17 03:51 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 17 Jun 2007 03:51:14 +0000 (17 03:51 +0000)
tree91b71edf59e57691a38c710506b54fd173583a94
parent40d9c87adf8be89a332e121e05886da001925820
Implement (non-bootable) GPT support.  If a PMBR partition type is detected
the rest of the MBR is ignored and the GPT partition table will be parsed
into slices.  GPT partition 0 will be s0, GPT partition 1 will be s1, etc.
Bootable support is forthcoming.

Remove support for COMPATIBILITY_SLICE when a MBR/GPT table is present.  That
is, the COMPATIBILITY_SLICE (s0) will still point to the dangerously
dedicated disklabel or be synthesized for a CD, but it will no longer point
to the 'first BSD slice' in a real MBR or GPT table.  For GPT tables
slice 0 (s0) will point at GPT partition #0, slice 1 (s1) at
GPT partition #1, etc.

Redo the reserved sector handling code.  There is now a single reserved
sector count instead of separate fields for the slice layer and disklabel
layer.

Redo the disklabel snooping code.  Note that you cannot run an old
/sbin/disklabel in raw (-r) mode with a new OS because the old disklabel
will not turn on snooping.  For now the on-disk format remains the same,
but more changes may be forthcoming (after discussion).  I would like to
get rid of the snooping entirely.

Add kuuid_is_nil() and use it to ignore unset GPT paritions.
12 files changed:
sbin/diskinfo/diskinfo.c
sbin/disklabel/disklabel.c
sys/dev/disk/ccd/ccd.c
sys/kern/kern_shutdown.c
sys/kern/kern_uuid.c
sys/kern/subr_disk.c
sys/kern/subr_diskmbr.c
sys/kern/subr_diskslice.c
sys/sys/diskmbr.h
sys/sys/diskslice.h
sys/sys/gpt.h
sys/sys/uuid.h