freebsd-dev/stand/libsa
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
..
amd64
geli Use if rather than case for a simple boolean. gcc thinks blks is 2018-07-13 18:19:33 +00:00
i386
mips
powerpc
sparc64
zfs Eliminate duplicated code and struct member definitions in the handoff 2018-12-03 03:58:30 +00:00
__main.c
abort.c Implement abort() as a call to panic. 2018-01-26 17:13:04 +00:00
arp.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
assert.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
bcd.c
bootp.c libsa: bootp is using pointers with different sign 2018-08-01 12:06:39 +00:00
bootp.h libsa: bootp is using pointers with different sign 2018-08-01 12:06:39 +00:00
bootparam.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
bootparam.h
bzipfs.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
cd9660.c libsa: dereferencing type-punned pointer in cd9660 2018-08-02 06:22:10 +00:00
cd9660read.c libsa: dereferencing type-punned pointer in cd9660 2018-08-02 06:22:10 +00:00
close.c libsa: remobe unneeded check before free() 2018-06-14 09:10:34 +00:00
closeall.c
crc32_libkern.c Fix stand/ build after r339671. 2018-10-23 23:11:38 +00:00
crc32.c
crc32.h
dev.c
dosfs.c libsa: dos_checksum() should take unsigned chars 2018-08-07 10:48:36 +00:00
dosfs.h Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
environment.c getenv does not return tainted data in the boot loader. Attempt to 2018-01-23 18:01:36 +00:00
ether.c
ext2fs.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
fstat.c
getopt.c
gets.c libsa: exit on EOF in ngets 2018-08-09 02:55:48 +00:00
globals.c
gpt.c Remove the 'mini libstand in libstand' that util.[ch] provided. These 2017-12-15 23:16:53 +00:00
gpt.h
gzipfs.c libsa: gzipfs.c converts pointers to integer types with different sign 2018-08-07 10:53:51 +00:00
in_cksum.c
inet_ntoa.c
ioctl.c
iodesc.h
ip.c Remove unnecessary include from libstand. 2018-10-31 19:59:20 +00:00
libsa.3 libsa(3): Correct statement about FS Write-support, name change 2018-06-09 14:24:16 +00:00
lseek.c
Makefile Fix stand/ build after r339671. 2018-10-23 23:11:38 +00:00
Makefile.depend
nandfs.c Revert r313780 (UFS_ prefix) 2018-03-17 12:59:55 +00:00
net.c Remove unnecessary include from libstand. 2018-10-31 19:59:20 +00:00
net.h Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
netif.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
netif.h
nfs.c libsa: assignment to char * from u_char * 2018-08-01 12:14:10 +00:00
nfsv2.h
nullfs.c libsa: replace remaining _write callbacks by null_write 2018-02-27 12:53:25 +00:00
open.c libsa: open() should use NULL instead of typecasted 0 2018-06-14 16:11:50 +00:00
pager.c
panic.c Split panic routine 2018-01-26 17:13:00 +00:00
pkgfs.c pkgfs_init: Initialize pkg 2018-08-15 21:13:10 +00:00
printf.c Make the v*printf() functions in libsa return int instead of void. 2018-06-05 17:18:10 +00:00
qdivrem.c
quad.h
random.c Fix random() and srandom() prototypes to match the standard. 2017-12-02 00:07:19 +00:00
rarp.c libsa: Consolidate tftp sendrecv into net.c sendrecv 2018-02-15 19:49:15 +00:00
read.c libsa: f_rabuf could be NULL 2018-06-14 09:06:53 +00:00
readdir.c
rpc.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
rpc.h
rpcv2.h
saioctl.h
sbrk.c The libstand's panic() appends its own '\n' to the message, so that users of the API 2018-11-29 18:37:48 +00:00
splitfs.c
stand.h Make the v*printf() functions in libsa return int instead of void. 2018-06-05 17:18:10 +00:00
stat.c
strcasecmp.c
strdup.c
strerror.c
tftp.c libsa: cstyle cleanup tftp.c 2018-11-01 22:13:18 +00:00
tftp.h
twiddle.c
udp.c Remove unnecessary include from libstand. 2018-10-31 19:59:20 +00:00
ufs.c Remove unused variables. 2018-06-13 17:42:50 +00:00
ufsread.c
uuid_from_string.c
uuid_to_string.c
write.c libsa: cstyle cleanup for open/close/read/write sources 2018-06-14 08:58:10 +00:00
xlocale_private.h Kill copies of strtol and strtoul. Use the ones that are in libc, 2018-01-31 04:29:00 +00:00
zalloc_defs.h
zalloc_malloc.c
zalloc_mem.h
zalloc_protos.h
zalloc.c