History log of /freebsd-10-stable/bin/kenv/kenv.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 309867 11-Dec-2016 delphij

MFC r309238,309239:

r309238: Plug a potential memory leak.
r309239: style(9).


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 250666 15-May-2013 delphij

Constify parameters, no functional or binary change.

Verified with: sha256(1)
MFC after: 2 weeks


# 235297 11-May-2012 mdf

Add a -v and -N option to kenv(1), so it can be more easily used in
scripts the way sysctl(8) is. The -N option, like in sysctl(8),
displays only the kenv names, not their values. The -v option prints an
individual kenv variable name with its value as name="value". This is
the inverse of sysctl(8)'s -n flag, since the default behaviour of
kenv(1) is already like sysctl(8) -n.

Submitted by: Garrett Cooper < yanegomi AT gmail DOT com >
MFC after: 1 week


# 201177 29-Dec-2009 ed

Add missing `void' for function without arguments.


# 150101 13-Sep-2005 rwatson

Add a "-q" quiet flag to kenv so that warnings can be suppressed.

MFC after: 1 week


# 139969 10-Jan-2005 imp

/*- or .\"- or #- to begin license clauses.


# 128698 27-Apr-2004 das

Various quibbles:
- Print a diagnostic if kdumpenv() fails. This can occur due to MAC
restrictions or lack of memory. Catch all kenv(2) failures as well.
- Just of the heck of it, DTRT if the kernel environment size changes
at the wrong time. The old code could fail silently or fail to
null-terminate a buffer if you got exceptionally unlucky.
- Sort and GC the #includes.


# 109574 20-Jan-2003 obrien

kenv(1) has been repo copied from usr.bin to bin.
Sometimes we need kenv(1) in /etc/rc.diskless*.


# 99112 30-Jun-2002 obrien

Consistently use FBSDID


# 94937 17-Apr-2002 mux

Use the new functionalities provided by the kenv(2) syscall.

Reviewed by: peter


# 86404 15-Nov-2001 dd

Deuglify the usage message by putting the program name after the
"usage:" string. This is how most (all?) other programs in the system
do it.

PR: 31596
Submitted by: Cyrille Lefevre <clefevre@citeweb.net>


# 62813 08-Jul-2000 peter

Initial kenv(1) hack for dumping the kernel environment. This can be
used to extract modified boot hints to make loader(8)-time changes
"sticky". It tries to use \ style quoting so that it can be used directly
with foo.conf files. It can also extract specific variables.