Commit Graph

37 Commits

Author SHA1 Message Date
christos df031f1edc PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
2006-11-25 21:40:04 +00:00
christos 92706ef61d make nlist struct static and use c99 initializers 2006-10-22 16:17:44 +00:00
christos 0f2aabcd39 Coverity CID 1858, 1857: Fix leaks. While here, pass lint use warn/warnx
instead of perror/fprintf. KNF.
2006-04-28 20:35:15 +00:00
simonb b6dcc6d5d8 Print a nice introductory line, per SUSv3 (and Posix?) 2005-02-21 04:32:55 +00:00
hubertf 2fa09966de Change copyright to 2-clause BSD-copyright.
Changed with explicit permission of Thorsten Lockert (tholo sigmasoft com)
2004-09-15 19:45:17 +00:00
simonb 221634063e Fix option handling so that you can show information about more than
one thing at a time.
Patch from Chris Demetriou a very long time ago.
2004-03-21 10:02:12 +00:00
fvdl c82a2904cb The last argument to sysctl() is a size_t, don't pass NULL in it. 2003-10-21 02:20:22 +00:00
itojun 032ed69f9a strlcpy 2003-07-12 13:23:55 +00:00
simonb 09b326de30 Make the ID field a little wider. 2003-04-07 01:42:37 +00:00
chs ffccbdabce fix a printf. 2002-09-21 04:30:42 +00:00
simonb 61ea584c2f Widen the ID field to 7 chars; probably should be auto-sized... 2002-05-21 01:10:06 +00:00
cgd a8ec668ddf convert to use getprogname() 2001-02-19 23:03:42 +00:00
simonb 643cb3c341 Don't check namelist when choosing to use the sysctl interface. 2000-06-16 03:51:00 +00:00
simonb 01f089f91b Include system info command line options [-MQST] in usage message.
Bomb out with usage message if extra command line arguments are present.
2000-06-03 04:12:48 +00:00
simonb cc24eb4a14 Big makeover:
- Use new SysV IPC sysctl interface if no core file or system name
   list supplied.
 - Break up into functions instead of a 398 line main (necessary for
   code re-use in kvm vs. sysctl case anyway).
 - Remove "#define _KERNEL" before including some kernel files!
 - Remove setgid bit.
2000-06-03 03:58:44 +00:00
thorpej 97b236dc90 Make this compile again. 2000-06-02 22:22:55 +00:00
sommerfeld 54de2bfd70 Rip out semconfig, since it's now a NOOP 2000-05-29 03:29:50 +00:00
simonb 91c0ba617c Make some columns and headers line up. 2000-04-12 15:37:14 +00:00
augustss 52bb6db3ff Make this compile again after several global structs where declared extern. 2000-03-28 23:36:11 +00:00
thorpej 345cb51c05 Update for changes to SVID IPC data structures. 1999-08-25 05:11:51 +00:00
mrg a9cc7dd256 use a buffer the size we fill. ensure another buffer is nul-terminated (ok in this code) 1998-07-06 10:16:40 +00:00
mrg 80efe80bc9 - change setgid kmem programs (that lend themselves to this) so setegid(getgid())
and the top, and then set the effective gid back to kmem around the call to
  kvm_openfiles().  this reduces the time group kmem is available.
- for those above that also allow this, setgid(getgid()) after the call to
  kvm_openfiles() to fully revoke priviledges.
- some KNF
- use err(3) over fprintf(3) in some places
1998-07-06 07:50:18 +00:00
kleink d88a338146 Need <time.h> for localtime() prototype. 1998-04-01 21:10:30 +00:00
lukem 180f5dc383 WARNSify, fix .Nm usage, getopt returns -1 not EOF 1997-10-19 03:23:46 +00:00
mrg e5baf973cc avoid not knowing the length of internal buffers. 1997-02-11 08:43:23 +00:00
explorer 00933138c8 Allocate space for 'ipcs -m' correctly; this floated across a FreeBSD
mailing list, and seems correct
1996-07-19 23:58:33 +00:00
thorpej cb237a9633 Discard setgid privileges if not reading the running kernel as suggested
by Mike Grupenhoff <kashmir@umiacs.umd.edu> in PR #2485.

While I'm here, update for modern libkvm interfaces, and be more
careful to check for error conditions reported by kvm_read(3).
1996-06-07 01:26:38 +00:00
cgd 1eb63df179 some copyright updates requested by Thorsten Lockert <tholo@SigmaSoft.COM> 1995-04-15 02:22:37 +00:00
jtc ae0b9c2010 KERNEL -> _KERNEL 1995-03-28 17:18:59 +00:00
cgd f8829b960e add string.h, fix up rcsid. 1994-12-24 16:46:18 +00:00
mycroft 959ab396d2 Fix typos, pointed out by Arne Juul. 1994-09-05 00:28:59 +00:00
cgd de6dacc48c add thorsten's copyright, which he sent to me. 1994-06-18 22:05:08 +00:00
cgd 7d77cc236d KNF, also clean up error messages. 1994-06-18 21:20:28 +00:00
cgd 0644f71bd2 new version by Thorsten Lockert <tholo@SigmaSoft.COM> 1994-06-18 21:09:40 +00:00
cgd 46429e6474 don't include shm.h if NOSHM defined, and defined it 1994-05-11 07:41:09 +00:00
cgd 67f7468b24 bad cast 1994-04-01 03:32:38 +00:00
cgd 0444b9fbd1 Add a System V -style ipc status monitor. Implemented by Daniel Boulet
<danny@BouletFermat.ab.ca>  Needs a man page, and *much* cleanup.
1993-11-14 16:17:55 +00:00