freebsd-dev/share
Mitchell Horne cba446e2c2 Add getenv(9) boolean parsing functions
This adds the getenv_bool() function, to parse a boolean value from a
kernel environment variable or tunable. This works for traditional
boolean values like "0" and "1", and also "true" and "false"
(case-insensitive). These semantics do not yet apply to sysctls declared
using SYSCTL_BOOL with CTLFLAG_TUN (they still only parse 1 and 0).

Also added are two wrapper functions, getenv_is_true() and
getenv_is_false(). These are slightly simpler for callers wishing to
perform a single check of a configuration variable.

Reviewed by:	jhb (slightly earlier version)
Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D26270
2020-09-21 15:24:44 +00:00
..
colldef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
ctypedef Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS. 2020-06-29 03:23:13 +00:00
dict
doc Move all sources from the llvm project into contrib/llvm-project. 2019-12-20 19:53:05 +00:00
dtrace Synchronize definitions in mbuf.d with values from mbuf.h 2020-08-05 11:54:02 +00:00
examples pkgbase: Remove the last users of the FreeBSD-example package 2020-08-04 14:48:45 +00:00
i18n
keys pkgbase: Add the pkg trusted keys to the FreeBSD-utilities package 2019-09-05 19:17:17 +00:00
man Add getenv(9) boolean parsing functions 2020-09-21 15:24:44 +00:00
misc Update to 2020.08.19 2020-09-16 07:30:18 +00:00
mk loader: zfs should support bootonce an nextboot 2020-09-21 09:01:10 +00:00
monetdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
msgdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
numericdef Add ga_IE.UTF-8 locale. 2018-11-26 19:39:49 +00:00
security
sendmail
skel Make sh(1) support \u in PS1. This removes one fork/exec on interactive 2019-01-24 11:59:46 +00:00
snmp Add entries for the OID used for NFS-over-TLS "user@domain". 2020-09-03 20:42:30 +00:00
syscons - sort according to scan code 2020-03-22 21:41:32 +00:00
tabset
termcap Update the screen termcap entries 2020-05-07 12:43:28 +00:00
tests
timedef Finsh readding Big5 in r317204, which was reverting r315568. This commit 2019-06-20 07:17:16 +00:00
vt Move font related data structured to sys/font.c and update vtfontcvt 2020-06-14 06:58:58 +00:00
zoneinfo Always install backward compatibility timezones, as they are installed 2020-04-09 05:11:18 +00:00
Makefile
Makefile.inc