summaryrefslogtreecommitdiff
path: root/usr.bin/getconf
AgeCommit message (Collapse)Author
2022-12-04userspace: remove vestigial '?' cases from top-level getopt(3) loopsScott Soule Cheloha
getopt(3) returns '?' when it encounters a flag not present in the in the optstring or if a flag is missing its option argument. We can handle this case with the "default" failure case with no loss of legibility. Hence, remove all the redundant "case '?':" lines. Prompted by dlg@. With help from dlg@ and millert@. Link: https://marc.info/?l=openbsd-tech&m=167011979726449&w=2 ok naddy@ millert@ dlg@
2022-07-20This no longer needs the inet pledge. sysconf(3) was modified to reportClaudio Jeker
_POSIX_IPV6 without opening a socket using a method that is allowed by the vminfo plegde. OK sthen@ deraadt@
2021-07-12Change the error reporting pattern throughout the tree when unveilBob Beck
fails to report the path that the failure occured on. Suggested by deraadt@ after some tech discussion. Work done and verified by Ashton Fagg <ashton@fagg.id.au> ok deraadt@ semarie@ claudio@
2018-10-26The code path were we pass `pathname' in the arguments is already limitedRicardo Mestre
with pledge(2), but since we know exactly what it is then we can go further and also unveil(2) it with read permissions. OK millert@ deraadt@
2016-10-28Delete some useless setlocale(3) calls in /usr/bin, no functional change.Ingo Schwarze
Patches from Jan Stary <hans at stare dot cz>, tweaked by me and tb@. While here, apply some simple style improvements: Sort headers, static void __dead usage(), return from main(), zap case '?', drop /* NOTREACHED */, drop break after usage(), ... OK tb@ millert@
2015-11-17Pledge for getconf(1). ok deraadt@ benno@Jeremie Courreges-Anglas
kern_pledge.c necessary additions committed earlier by deraadt@
2015-03-22Add sysconf() extensions PHYS_PAGES, AVPHYS_PAGES, NPROCESSORS_CONFTodd C. Miller
and NPROCESSORS_ONLN. OK guenther@
2013-03-28Add support for _PC_TIMESTAMP_RESOLUTION for ffs/mfs, cd9600, ext2,Philip Guenther
msdos, NFS, fifos and devices, plus support for querying it in getconf(2) and the requisite pathconf(2) manpage blurb ok tedu@
2013-03-07Remove a couple duplicates entries that snuck in.Philip Guenther
Per POSIX, if confstr() returns zero without setting errno ("no defined value") then print "undefined\n". Don't include a pointless number in the error messasge if confstr() fails. Above pointed out by Andres Perera (andres.p (at) zoho.com) Orgranize the CONFSTR code like the SYSCONF and PATHCONF cases. Don't test for confstr() returning (size_t)-1, as that's not special. Delete lint comments and unnecessary casts.
2013-03-02sort options, and avoid line wrap, in usage(); ok guentherJason McIntyre
2013-03-02missing newline;Jason McIntyre
2013-03-02Bring getconf(1) substantially up to spec with POSIX 1003.1-2008,Philip Guenther
adding 155 new names as well as support for the -v option. Also, add support for non-standard -L and -l options for listing the known names. (Contrast with the Solaris/Linux -a option, whose output is inconsistent and can't be reliably parsed.) ports build tested by espie@
2010-09-03add an EXIT STATUS section for /usr/bin;Jason McIntyre
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2009-01-04replace hardcoded exit values with .Ex macros;Igor Sobrado
ok jmc@
2008-11-08fix format stringCharles Longeau
ok otto@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-30- use a consistent text for STANDARDSJason McIntyre
- note which options are extensions to POSIX
2006-12-04check confstr() return value. Due to the braindead return valueOtto Moerbeek
specified by POSIX we have to clear errno before; also check for -1 to remain compatible. ok millert@
2003-07-10add missing includesDavid Krause
ok deraadt@ tedu@
2003-06-10mostly ansi cleanup; pval okTheo de Raadt
2003-05-21From NetBSD:Paul Janzen
Fix an ancient typo which made "_POSIX_PATH_MAX" actually return "_POSIX_PIPE_BUF".
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2001-07-12first pass at a -Wall cleanupTheo de Raadt
2001-03-01Sync usage() with man page; mpech@prosoft.org.lvAaron Campbell
2000-03-07Various cleanup.Aaron Campbell
1999-06-05- remove trailing white spaceAaron Campbell
- remove arguments from .Os macros - remove arguments from .Nm macros, where appropriate - some more Dq/Sq/Ql insanity - still lots to do in the usr.bin tree... :/
1998-09-26usr.bin/ man page fixes, f-m.Aaron Campbell
1997-09-21$OpenBSD$Theo de Raadt
1996-06-26rcsidTheo de Raadt
1996-05-04call errx instead of errTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt