Commit Graph

21 Commits

Author SHA1 Message Date
Mike Barcroft
3c392172d7 Back out rev 1.20; getbsize(3)'s original interface has been restored.
Approved by:	markm
2002-12-30 18:14:43 +00:00
Mark Murray
a09114536e Adjust for getbsize argument type change. 2002-10-23 19:02:17 +00:00
Mark Murray
4b51efd2b3 Remove unneeded function prototypes. 2002-10-23 16:20:12 +00:00
Warner Losh
3f330d7d1a remove __P 2002-03-22 01:42:45 +00:00
Mark Murray
9ff712b0f5 WARNS=2 fixes with NO_WERROR set, as there are some header issues
with namelists. use __FBSDID().
2001-12-12 00:13:37 +00:00
Kris Kennaway
096c40e3f3 Mark error() as __printflike() and fix a non-exploitable format string
error.

MFC after:	1 week
2001-05-25 23:15:05 +00:00
Thomas Moestl
342e2faa09 Get rid of setgid kmem for systat, and while being there, fix some bugs
and compiler warnings.
The data for network statistics are still obtained via the kvm interface
if systat was started with the needed privileges, otherwise sysctls are
used. The reason for this is that with really many open sockets, the
sysctl method is probably slower, but it systat -netstat is probably not
really usable in either mode under these conditions.

Approved by:	rwatson
2001-03-23 03:58:25 +00:00
Peter Wemm
540bc8d6e1 Quick Fix: swap.c doesn't appear to actually need <sys/conf.h>, so remove
it to try and get world building again.  (sys/conf.h now depends on
sys/types.h)
2000-08-24 20:22:44 +00:00
Poul-Henning Kamp
9df46d4a2a Don't include <sys/buf.h> 2000-05-05 15:41:22 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
bf0e1ee370 Tidy up references to <sys/rlist.h> and support for the old swap management
that went away in January.
1999-05-11 14:32:18 +00:00
Matthew Dillon
300c6da23d Be nice when no swap is configured in system 1999-02-06 06:43:56 +00:00
Matthew Dillon
4aa513f41d Fix labeling bug 1999-01-22 10:57:50 +00:00
Matthew Dillon
e53c5e2053 Make systat -swap use new kvm_swapinfo() function 1999-01-22 10:53:13 +00:00
David E. O'Brien
d22889b821 Quiet many compiler warnings. 1998-10-08 09:56:10 +00:00
Warner Losh
448b84a0e4 o Use snprintf rather than sprintf
o Add more checks for buffer overflows
o Use snprintf rather than strcat/cpy and have better checks for max
  length exceeded.

Most of these changes are not exploitable buffer overruns, but it never
hurts to be safe.

Inspired by and obtained from: OpenBSD
1998-06-09 04:17:29 +00:00
Bruce Evans
a15f578988 Merge from Lite2 (print "??" instead NULL if devname() fails). More
faithful stealing from pstat would have given this already.
1997-07-06 04:37:22 +00:00
Joerg Wunsch
6b5d41d069 Fix the following old problem:
date: 1994/10/09 07:37:18;  author: davidg;  state: Exp;  lines: +7 -1
  #if 0'd out the meat of the swap code until I get a chance to rewrite it.

...mainly by stealing the code from pstat(8).
1997-01-12 19:38:32 +00:00
Rodney W. Grimes
7799f52a32 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
David Greenman
82c4eab0a7 #if 0'd out the meat of the swap code until I get a chance to rewrite it. 1994-10-09 07:37:18 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00