freebsd-skq/stand/libsa
Warner Losh 52379d36a9 Create helper functions for parsing boot args.
boot_parse_arg		to parse a single arg
boot_parse_cmdline	to parse a command line string
boot_parse_args		to parse all the args in a vector
boot_howto_to_env	Convert howto bits to env vars
boot_env_to_howto	Return howto mask mased on what's set in the environment.

All these routines return an int that's the bitmask of the args
translated to RB_* flags. As a special case, the 'S' flag sets the
comconsole_speed env var. Any arg that looks like a=b will set the env
key 'a' to value 'b'. If =b is omitted, 'a' is set to '1'.  This
should help us reduce the number of redundant copies of these routines
in the tree.  It should also give a more uniform experience between
platforms.

Also, invent a new flag RB_PROBE that's set when 'P' is parsed.  On
x86 + BIOS, this means 'probe for the keyboard, and if it's not there
set both RB_MULTIPLE and RB_SERIAL (which means show the output on
both video and serial consoles, but make serial primary).  Others it
may be some similar concept of probing, but it's loader dependent
what, exactly, it means.

These routines are suitable for /boot/loader and/or the kernel,
though they may not be suitable for the tightly hand-rolled-for-space
environments like boot2.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16205
2018-07-13 16:43:05 +00:00
..
amd64
geli stand: move libgeliboot into libsa. 2018-06-18 16:24:42 +00:00
i386
mips
powerpc
sparc64
zfs Move ZFS files into libsa 2018-07-08 07:42:49 +00:00
__main.c
abort.c Implement abort() as a call to panic. 2018-01-26 17:13:04 +00:00
arp.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
assert.c
bcd.c
bootp.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
bootp.h dhcp_try_rfc1048() is not used any more 2017-12-06 06:49:53 +00:00
bootparam.c Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
bootparam.h
bzipfs.c
cd9660.c libsa: cd9660: warning: 'lenskip' may be used uninitialized in this function 2018-04-07 14:40:09 +00:00
cd9660read.c libsa: name is not used in dirmatch() 2018-04-07 14:42:47 +00:00
close.c libsa: remobe unneeded check before free() 2018-06-14 09:10:34 +00:00
closeall.c
crc32.c
crc32.h
dev.c
dosfs.c
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
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
in_cksum.c
inet_ntoa.c
ioctl.c
iodesc.h
ip.c libsa: Fix IP recv timeout 2018-02-14 15:40:13 +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 Create helper functions for parsing boot args. 2018-07-13 16:43:05 +00:00
Makefile.depend
nandfs.c Revert r313780 (UFS_ prefix) 2018-03-17 12:59:55 +00:00
net.c libsa: Partially revert r330023 2018-02-26 18:24:24 +00:00
net.h Prefer uintXX_t to u_intXX_t 2018-03-13 16:33:00 +00:00
netif.c
netif.h
nfs.c Initialize variables we later free so they aren't used 2018-06-13 17:42:55 +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
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 Panic in sbrk if setheap hasn't been called yet. This is preferable to 2017-12-15 23:16:47 +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 Remove unused variables. 2018-06-13 17:42:50 +00:00
tftp.h
twiddle.c
udp.c
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