1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00
freebsd/stand/i386
Ian Lepore df108aafe9 Eliminate duplicated code and struct member definitions in the handoff
of args data between gptboot/zfsboot and loader(8).

Despite what seems like a lot of changes here, there are no actual
changes in behavior, or in the data layout in the structures involved.
This is just eliminating identical code pasted into multiple locations.

In detail, the changes are...

- Move struct zfs_boot_args definition from libsa/zfs/libzfs.h to
  i386/common/bootargs.h because it is specific to x86 booting and the
  handoff between zfsboot and loader, and has no relation to the zfs
  library code in general.

- The geli_boot_args and zfs_boot_args structs both contain an identical
  set of member variables containing geli information.  Extract this out
  to a new geli_boot_data struct, and embed it in the arg-passing structs.

- Provide new routines geli_import_boot_data() and geli_export_boot_data()
  that can be shared between gptboot, zfsboot, and loader instead of
  pasting identical code into several different .c files.

- Remove some checks for a NULL pointer that can never be true because the
  pointer being tested was set using pointer math (kargs + 1) and that can
  never result in NULL in this code.
2018-12-03 03:58:30 +00:00
..
boot0 Centralize several variables. 2018-02-02 06:32:26 +00:00
boot0sio
boot2 NM and OBJCOPY are already defined for all builds. There's no need to 2018-07-20 05:17:56 +00:00
btx btx: rename .s files to .S to use Clang IAS 2018-11-26 19:14:33 +00:00
cdboot Centralize several variables. 2018-02-02 06:32:26 +00:00
common Eliminate duplicated code and struct member definitions in the handoff 2018-12-03 03:58:30 +00:00
gptboot Eliminate duplicated code and struct member definitions in the handoff 2018-12-03 03:58:30 +00:00
gptzfsboot NM and OBJCOPY are already defined for all builds. There's no need to 2018-07-20 05:17:56 +00:00
isoboot isoboot, gptboot: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general 2018-08-09 02:06:25 +00:00
kgzldr Catch up to the inflate renaming. 2018-07-13 20:08:18 +00:00
libfirewire fwohcireg.h is 99% the same between the boot loader and the 2018-03-31 22:02:59 +00:00
libi386 loader: create separate lists for fd, cd and hd, merge bioscd with biosdisk 2018-11-30 08:01:11 +00:00
loader Eliminate duplicated code and struct member definitions in the handoff 2018-12-03 03:58:30 +00:00
loader_4th Create a loader for each interpreter for x86 BIOS and all EFI 2018-08-14 18:44:41 +00:00
loader_lua Create a loader for each interpreter for x86 BIOS and all EFI 2018-08-14 18:44:41 +00:00
loader_simp Create a loader for each interpreter for x86 BIOS and all EFI 2018-08-14 18:44:41 +00:00
mbr Centralize several variables. 2018-02-02 06:32:26 +00:00
pmbr Centralize several variables. 2018-02-02 06:32:26 +00:00
pxeldr Bump the date of pxeboot(8) manual page for r340917. 2018-11-27 08:51:15 +00:00
zfsboot Eliminate duplicated code and struct member definitions in the handoff 2018-12-03 03:58:30 +00:00
boot.ldscript
Makefile Create a loader for each interpreter for x86 BIOS and all EFI 2018-08-14 18:44:41 +00:00
Makefile.inc Disable build-id in i386 binary boot components 2018-11-23 13:50:18 +00:00