]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Use the actual struct devdesc at the start of all *_devdesc structs
authorWarner Losh <imp@FreeBSD.org>
Mon, 12 Mar 2018 21:39:49 +0000 (21:39 +0000)
committerWarner Losh <imp@FreeBSD.org>
Mon, 12 Mar 2018 21:39:49 +0000 (21:39 +0000)
commitde04d704a98a7d2e9e57ebd83d2dd7a19fc11dab
tree8b2a7c70182f66162f89a183d74cd3d07bb9ffa6
parentf264386b3233a7eba03e0afe0e01e39c509d597d
Use the actual struct devdesc at the start of all *_devdesc structs

The current system is fragile and requires very careful layout of all
*_devdesc structures. It also makes it hard to change the base
devdesc. Take a page from CAM and put the 'header' in all the derived
classes and adjust the code to match.

For OFW, move the iHandle h_handle out of a slot conflicting with
d_opendata. Due to quirks in the alignment rules, this worked.
However changing the code to use d_opendata storage now that it's a
pointer is hard, so just have a separate field for it.

All other cleanups were to make the *_devdesc structures match where
they'd taken some liberties that were none-the-less compatible enough
to work.
27 files changed:
stand/common/disk.c
stand/common/disk.h
stand/efi/libefi/efipart.c
stand/efi/libefi/efizfs.c
stand/efi/loader/main.c
stand/i386/libi386/bioscd.c
stand/i386/libi386/biosdisk.c
stand/i386/libi386/bootinfo32.c
stand/i386/libi386/devicename.c
stand/i386/libi386/libi386.h
stand/i386/loader/chain.c
stand/i386/loader/main.c
stand/mips/beri/loader/beri_disk_cfi.c
stand/mips/beri/loader/beri_disk_sdcard.c
stand/mips/beri/loader/devicename.c
stand/ofw/libofw/devicename.c
stand/ofw/libofw/libofw.h
stand/sparc64/loader/main.c
stand/uboot/common/main.c
stand/uboot/lib/devicename.c
stand/uboot/lib/disk.c
stand/uboot/lib/libuboot.h
stand/userboot/userboot/devicename.c
stand/userboot/userboot/main.c
stand/userboot/userboot/userboot_disk.c
stand/zfs/libzfs.h
stand/zfs/zfs.c