1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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
This commit is contained in:
Robert Watson 2000-12-17 18:43:28 +00:00
parent 95b2cbbc17
commit 48c193e183
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70118

View File

@ -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();