Move all the code related to handling the current 32 bit disklabel
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 18 Jun 2007 05:13:43 +0000 (05:13 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 18 Jun 2007 05:13:43 +0000 (05:13 +0000)
commit2b96188328077d6caeb059080499fe9949e03351
tree59f9449583b8405b4a2c21ff98825f4defa3bef5
parent55a78310520b43adc3ad7fd0fa80fb9b60924418
Move all the code related to handling the current 32 bit disklabel
to subr_disklabel32.c.  Move the header file from sys/disklabel.h to
sys/disklabel32.h.  Rename all the related structures and constants
and retire 'struct disklabel'.

Redo the sys/disklabel.h header file to implement a generic disklabel
abstraction.  Modify kern/subr_diskslice.c to use this abstraction, with
some shims for the ops dispatch at the moment which will be cleaned up later.

Adjust all auxillary code that directly accesses 32 bit disklabels to use
the new structure and constant names.

Remove the snoop-adjust code.  The kernel would snoop reads and writes to
the disklabel area via the raw slice device (e.g. ad0s1) and convert the
disklabel from the in-core format to the on-disk format and vise-versa.
The reads and writes made by disklabel -r and the kernel's own internal
readdisklabel and writedisklabel code used the snooping.

Rearrange the kernel's internal code to manually convert the disklabel when
reading and writing.  Rearrange the /sbin/disklabel program to do the same
when the -r option is used.  Have the disklabel program also check which
DragonFly OS it is running under so it can be run on older systems.  Note
that the disklabel binary prior to these changes will NOT operate on the
disklabel properly if running on a NEW kernel.

Introduce skeleton files for 64 bit disklabel support.
23 files changed:
include/disktab.h
lib/libc/gen/disklabel.c
lib/libc/gen/getdiskbyname.3
lib/libstand/stand.h
sbin/disklabel/disklabel.8
sbin/disklabel/disklabel.c
sbin/gpt/migrate.c
sbin/vinum/list.c
sys/boot/efi/libefi/devicename.c
sys/boot/ia64/libski/devicename.c
sys/boot/pc32/boot2/boot2.c
sys/boot/pc32/libi386/biosdisk.c
sys/boot/pc32/libi386/devicename.c
sys/conf/files
sys/kern/subr_disklabel32.c
sys/kern/subr_diskslice.c
sys/sys/disklabel.h
sys/sys/disklabel32.h
sys/sys/disklabel64.h [new file with mode: 0644]
sys/sys/diskslice.h
sys/sys/ndisklabel.h [deleted file]
sys/sys/odisklabel.h [deleted file]
sys/sys/param.h