Commit Graph

7 Commits

Author SHA1 Message Date
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
Benedict Reuschling
55ed6718c2 Fix various, mostly minor errors in man pages like:
- Abbreviated month name in .Dd
- position of HISTORY section
- alphabetical ordering within SEE ALSO section
- adding .Ed before .Sh DESCRIPTION
- remove trailing whitespaces
- Line break after a sentence stop
- Use BSD OS macros instead of hardcoded strings

No .Dd bumps as there was no actual content change made
in any of these pages.

Submitted by:	Gordon Bergling gbergling_gmail.com
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D24591
2020-05-03 10:15:58 +00:00
Eric van Gyzen
c8de781de7 getenv(9): rename to "kern_getenv", etc.
Update the documentation to catch up with r273174, which renamed
      getenv -> kern_getenv
      setenv -> kern_setenv
    unsetenv -> kern_unsetenv

Leave the old links in place to support finger memory.

MFC after:	3 days
Sponsored by:	Dell EMC
2017-06-01 21:07:25 +00:00
Conrad Meyer
9f2eb74093 getenv.9: Document behavior of freeenv(NULL)
Fix a couple igor(1)-indicated spelling issues while here.

Suggested by:	jhb
Sponsored by:	EMC / Isilon Storage Division
2015-10-22 16:46:30 +00:00
John Baldwin
179fa75e6e Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
Joel Dahl
457a378f05 mdoc: document title should be all caps. 2013-10-30 21:52:31 +00:00
John Baldwin
fa24b620c0 Add a manpage for the getenv() family of functions in the kernel. 2013-10-22 20:10:38 +00:00