Commit Graph

12 Commits

Author SHA1 Message Date
delphij
79715bae4e style(9).
MFC after:	2 weeks
2016-11-28 07:21:09 +00:00
delphij
a2c097d458 Plug a potential memory leak.
MFC after:	2 weeks
2016-11-28 07:19:45 +00:00
delphij
9a44ba5a35 Constify parameters, no functional or binary change.
Verified with:	sha256(1)
MFC after:	2 weeks
2013-05-15 18:38:28 +00:00
mdf
c0de32bfd6 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
2012-05-11 23:05:14 +00:00
ed
a2433cb674 Add missing `void' for function without arguments. 2009-12-29 08:45:07 +00:00
rwatson
3b28b9c819 Add a "-q" quiet flag to kenv so that warnings can be suppressed.
MFC after:	1 week
2005-09-13 19:01:53 +00:00
imp
a76898b849 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
das
c0899a25b2 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.
2004-04-28 01:27:36 +00:00
obrien
bc61fc95d8 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
mux
ef239236f8 Use the new functionalities provided by the kenv(2) syscall.
Reviewed by:	peter
2002-04-17 13:08:14 +00:00
dd
bbce60529d 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>
2001-11-15 15:46:45 +00:00
peter
216932df49 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.
2000-07-08 08:33:40 +00:00