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

usr.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/


# 0840e619 22-May-2018 Garrett Wollman <wollman@FreeBSD.org>

Move unsigned limits to a separate table/recognizer and display them
using the appropriate (unsigned) format specification. This prevents
integer overflow when ULLONG_MAX and (on some architectures) ULONG_MAX
are used to initialize an intmax_t and then displayed as the signed
value -1. (A different approach was suggested in the bug report,
which I did not use.) If other limits are defined to be unsigned,
they could be moved here.

PR: 164049
Reported by: Marcus Reid


# dda1cfcf 15-Sep-2017 John Baldwin <jhb@FreeBSD.org>

Add an -a flag to getconf.

When -a is specified, the name and value of all system or path
configuration values is reported to standard output.

Reviewed by: kib (earlier version)
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D12373


# b4b4b530 28-Jan-2017 Baptiste Daroussin <bapt@FreeBSD.org>

Revert crap accidentally committed


# 814aaaa7 28-Jan-2017 Baptiste Daroussin <bapt@FreeBSD.org>

Revert r312923 a better approach will be taken later


# 11b0c200 23-Aug-2016 Enji Cooper <ngie@FreeBSD.org>

Clean up trailing whitespace

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division


# 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.


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

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


# 37716191 05-Dec-2006 Maxim Konovalov <maxim@FreeBSD.org>

o confstr(3) returns 0 on error. Check the return value accordingly.

PR: misc/106414
MFC after: 1 week


# a272cd3a 22-Aug-2003 Mark Murray <markm@FreeBSD.org>

Warns fixes. Mainly unused headers/params/vars removal, but also
some malloc cleanup.


# 7007f3d6 17-Aug-2003 Tim J. Robbins <tjr@FreeBSD.org>

Tidy up usage message.


# 0cd41dca 21-Jul-2003 Mark Murray <markm@FreeBSD.org>

Replace an alloca() call with a slightly more standard malloc()/free()
pair.


# 11e3dcb6 26-Oct-2002 Garrett Wollman <wollman@FreeBSD.org>

Add new 1003.1-2001/TC1/D6 parameters. (On final recirculation ballot now,
so this should be officially TC1 before the New Year.)

Add TrustedBSD pathconf parameters.

Add compilation support for -stable (to be merged momentarily).


# e9cfb9ae 18-Sep-2002 Garrett Wollman <wollman@FreeBSD.org>

Completely revamp the way getconf(1) works, for better adherence to the
intent of the Standard.

- Make getconf able to distinguish between configuration variables which
are entirely unknown and those which are merely not defined in the
compilation environment. The latter now get a more appropriate
"undefined\n" result rather than a diagnostic. This may not be
exactly right, but it's closer to the intent of the Standard than
the previous behavior.

- Support ``programming environments'' by validating that the environment
requested with the `-v' flag is the one-and-only execution environment.
(If more environments are supported for some platforms in the future,
multiple getconf(1) executables will be required, but a simple edit in
progenv.gperf will enable automatic support for it.) Document POSIX
standard programming environments.

- Add all of the 1003.1-2001 configuration variables. FreeBSD does not
support all of these (including some that are mandatory); getconf will
later be fixed to break the world should a required variable not be
defined.

As a result of all these changes, gperf is no longer adequate. Keep the
overall format and names of the files for now, to preserve revision history.
Use an awk script to process the .gperf files into C source, which does a
few things that gperf, as a more general tool, cannot do. The keyword
recognition function is no longer a perfect hash function.

This may obviate the need for gperf in the source tree.

- Add a small compile-time regression test to break the build if any of the
.gperf files declare conflicting token sets. (gperf itself would have done
this for the simple case of duplicate tokens in the same input file.)


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

Consistently use FBSDID


# 91b14bff 04-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

confstr() returns (size_t)-1 on failure. Check for this explicitly instead
of trying to see if an unsigned number is less than zero.


# 04662725 21-Feb-2001 Garrett Wollman <wollman@FreeBSD.org>

Destroy the evidence of my misunderstanding of the specification.
Also fix up the phrasing in the man page a bit.


# 8c6bd995 25-Apr-2000 Garrett Wollman <wollman@FreeBSD.org>

Hello, getconf. This is a slight reinvention of the
wheel^H^H^H^H^HPOSIX.2 and X/Open utility, and rather
more complicated than necessary.