History log of /freebsd-current/bin/kenv/kenv.c
Revision Date Author Comments
# e043f372 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# db0f2643 20-Jun-2021 Kyle Evans <kevans@FreeBSD.org>

kenv: allow listing of static kernel environments

The early environment is typically cleared, so these new options
need the PRESERVE_EARLY_KENV kernel config(8) option. These environments
are reported as missing by kenv(1) if the option is not present in the
running kernel.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D30835


# 4dceaf94 28-Nov-2016 Xin LI <delphij@FreeBSD.org>

style(9).

MFC after: 2 weeks


# 305de00e 28-Nov-2016 Xin LI <delphij@FreeBSD.org>

Plug a potential memory leak.

MFC after: 2 weeks


# 41f05c82 15-May-2013 Xin LI <delphij@FreeBSD.org>

Constify parameters, no functional or binary change.

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


# af68c71a 11-May-2012 Matthew D Fleming <mdf@FreeBSD.org>

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


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 03929509 29-Dec-2009 Ed Schouten <ed@FreeBSD.org>

Add missing `void' for function without arguments.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# af2b8e58 13-Sep-2005 Robert Watson <rwatson@FreeBSD.org>

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

MFC after: 1 week


# 9ddb49cb 10-Jan-2005 Warner Losh <imp@FreeBSD.org>

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


# 87a99f5f 27-Apr-2004 David Schultz <das@FreeBSD.org>

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.


# e026a48c 29-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use FBSDID


# 41196280 17-Apr-2002 Maxime Henrion <mux@FreeBSD.org>

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

Reviewed by: peter


# ad3f90f6 15-Nov-2001 Dima Dorfman <dd@FreeBSD.org>

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>


# c87a63c1 08-Jul-2000 Peter Wemm <peter@FreeBSD.org>

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.