aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/vmstat
diff options
context:
space:
mode:
authorKenneth D. Merry <ken@FreeBSD.org>1999-02-10 00:04:13 +0000
committerKenneth D. Merry <ken@FreeBSD.org>1999-02-10 00:04:13 +0000
commit2a888f938e5f02e6579c0a12283121a626a90fe1 (patch)
treee59cff1653e99e08396d9972b06e486a471f513e /usr.bin/vmstat
parent9b8eb634313b7fe1f121677ce8908ed34d138569 (diff)
Notes
Diffstat (limited to 'usr.bin/vmstat')
-rw-r--r--usr.bin/vmstat/vmstat.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 3bc3a7ce96d4..067d6d7d3fa0 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)vmstat.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: vmstat.c,v 1.27 1998/09/20 00:11:17 ken Exp $";
+ "$Id: vmstat.c,v 1.29 1998/10/28 06:41:24 jdp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -278,6 +278,15 @@ main(argc, argv)
char **getdrivedata();
struct winsize winsize;
+ /*
+ * Make sure that the userland devstat version matches the
+ * kernel devstat version. If not, exit and print a
+ * message informing the user of his mistake.
+ */
+ if (checkversion() < 0)
+ errx(1, "%s", devstat_errbuf);
+
+
argv = getdrivedata(argv);
winsize.ws_row = 0;
(void) ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&winsize);
@@ -426,14 +435,6 @@ dovmstat(interval, reps)
if (!hz)
kread(X_HZ, &hz, sizeof(hz));
- /*
- * Make sure that the userland devstat version matches the kernel
- * devstat version. If not, exit and print a message informing
- * the user of his mistake.
- */
- if (checkversion() < 0)
- errx(1, "%s", devstat_errbuf);
-
for (hdrcnt = 1;;) {
if (!--hdrcnt)
printhdr();