summaryrefslogtreecommitdiff
path: root/usr.bin/vmstat/dkstats.c
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-14 07:24:13 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-05-14 07:24:13 +0000
commitfda39df9d12a17ae49d87348b1e9614ab8778576 (patch)
tree693965726cf87ec201d9890c8e0521245eec0b26 /usr.bin/vmstat/dkstats.c
parent61727c2cde3ce4620951477ba76ddfa5f24bb1a5 (diff)
Use warn() consistently.
Diffstat (limited to 'usr.bin/vmstat/dkstats.c')
-rw-r--r--usr.bin/vmstat/dkstats.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/vmstat/dkstats.c b/usr.bin/vmstat/dkstats.c
index aa61612218c..eeebc093455 100644
--- a/usr.bin/vmstat/dkstats.c
+++ b/usr.bin/vmstat/dkstats.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkstats.c,v 1.10 2001/05/14 07:20:50 angelos Exp $ */
+/* $OpenBSD: dkstats.c,v 1.11 2001/05/14 07:24:12 angelos Exp $ */
/* $NetBSD: dkstats.c,v 1.1 1996/05/10 23:19:27 thorpej Exp $ */
/*
@@ -177,7 +177,7 @@ dkreadstats()
mib[0] = CTL_KERN;
mib[1] = KERN_CPTIME;
if (sysctl(mib, 2, cur.cp_time, &size, NULL, 0) < 0) {
- warnx("could not read kern.cp_time");
+ warn("could not read kern.cp_time");
bzero(cur.cp_time, sizeof(cur.cp_time));
}
size = sizeof(cur.tk_nin);
@@ -185,7 +185,7 @@ dkreadstats()
mib[1] = KERN_TTY;
mib[2] = KERN_TTY_TKNIN;
if (sysctl(mib, 3, &cur.tk_nin, &size, NULL, 0) < 0) {
- warnx("could not read kern.tty.tk_nin");
+ warn("could not read kern.tty.tk_nin");
cur.tk_nin = 0;
}
size = sizeof(cur.tk_nin);
@@ -193,7 +193,7 @@ dkreadstats()
mib[1] = KERN_TTY;
mib[2] = KERN_TTY_TKNOUT;
if (sysctl(mib, 3, &cur.tk_nout, &size, NULL, 0) < 0) {
- warnx("could not read kern.tty.tk_nout");
+ warn("could not read kern.tty.tk_nout");
cur.tk_nout = 0;
}
} else {
@@ -265,7 +265,7 @@ int select;
mib[1] = HW_DISKCOUNT;
size = sizeof(dk_ndrive);
if (sysctl(mib, 2, &dk_ndrive, &size, NULL, 0) < 0 ) {
- warnx("could not read hw.diskcount");
+ warn("could not read hw.diskcount");
dk_ndrive = 0;
}
@@ -274,7 +274,7 @@ int select;
mib[1] = KERN_CLOCKRATE;
size = sizeof(clkinfo);
if (sysctl(mib, 2, &clkinfo, &size, NULL, 0) < 0) {
- warnx("could not read kern.clockrate");
+ warn("could not read kern.clockrate");
hz = 0;
} else
hz = clkinfo.stathz;