summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-12-17 18:43:28 +0000
committerrwatson <rwatson@FreeBSD.org>2000-12-17 18:43:28 +0000
commit4853249b9bf5b3d8c47613dadd101add9d67372f (patch)
tree73fbc12e5404ea2fa171f3d67550e034d6059648 /usr.bin/systat
parente483aa0cee4a82f2944caa5015aa009669ab419e (diff)
downloadFreeBSD-src-4853249b9bf5b3d8c47613dadd101add9d67372f.zip
FreeBSD-src-4853249b9bf5b3d8c47613dadd101add9d67372f.tar.gz
o Fix up includes which built due to excessive nested including in the
base system, but not in BruceBSD. o Fix up style violations of various sorts. o Remove redundant normalization of hertz variable, as the sysctl handler does this work (unlike when kread was used). Submitted by: bde
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index f524dca..52bb1e5 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -46,6 +46,7 @@ static const char rcsid[] =
#endif /* not lint */
#include <sys/param.h>
+#include <sys/time.h>
#include <err.h>
#include <locale.h>
@@ -66,7 +67,7 @@ double avenrun[3];
int col;
int naptime = 5;
int verbose = 1; /* to report kvm read errs */
-struct clockinfo clkinfo;
+struct clockinfo clkinfo;
double hertz;
char c;
char *namp;
@@ -81,7 +82,7 @@ main(argc, argv)
int argc;
char **argv;
{
- char errbuf[80];
+ char errbuf[80];
size_t size;
int err;
@@ -133,15 +134,13 @@ main(argc, argv)
die(0);
}
gethostname(hostname, sizeof (hostname));
-
size = sizeof(clkinfo);
err = sysctlbyname("kern.clockrate", &clkinfo, &size, NULL, 0);
if (err != 0 || size != sizeof(clkinfo)) {
- perror("kern.clockrate");
+ error("kern.clockrate");
die(0);
}
-
- hertz = clkinfo.stathz ? clkinfo.stathz : clkinfo.hz;
+ hertz = clkinfo.stathz;
(*curcmd->c_init)();
curcmd->c_flags |= CF_INIT;
labels();
OpenPOWER on IntegriCloud