summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/sysctl.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r285188:pkelsey2015-07-151-2/+14
| | | | | | | | Fix sysctl(3) so it returns the intended values for all mib names in the 'user' sysctl tree, which have all been coming back 0 or empty since r240176. Approved by: re
* Avoid segfault if name is invalid. Basically, onlytrhodes2012-09-061-2/+5
| | | | | | | check for CTL_USER if the sysctl fails with ENOENT. PR: 169056 Reviewed by: jhb
* Add proper const keywords to sysctl(3) parameters.ed2010-02-211-7/+4
| | | | | | | | | | | | | The `name' and `newp' arguments can be marked const, because the buffers they refer to are never changed. While there, perform some other cleanups: - Remove K&R from sysctl.c. - Implement sysctlbyname() using sysctlnametomib() to prevent duplication of an undocumented kernel interface. - Fix some whitespace nits. It seems the prototypes are now in sync with NetBSD as well.
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-091-4/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).nectar2003-02-161-0/+3
| | | | | | | Only warnings that could be fixed without changing the generated object code and without restructuring the source code have been handled. Reviewed by: /sbin/md5
* Fix the style of the SCM ID's.obrien2002-03-221-0/+2
| | | | I believe have made all of libc .c's as consistent as possible.
* Make the implementation and documentation agree. Specifically:des1999-01-061-4/+8
| | | | | | | - document that sysctl() and sysctlbyname() return 0 on success - if the provided buffer is too small, set errno to ENOMEM and return -1 instead of returning ENOMEM.
* Minor cleanup, mostly unused vars and missing #includes.phk1995-10-221-0/+1
|
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+177
OpenPOWER on IntegriCloud