diff options
| author | Matthew Dillon <dillon@FreeBSD.org> | 1998-09-16 18:20:23 +0000 |
|---|---|---|
| committer | Matthew Dillon <dillon@FreeBSD.org> | 1998-09-16 18:20:23 +0000 |
| commit | 8f82c3ea68d955b6e231772d74d6e226aacd6931 (patch) | |
| tree | 22ea59f3013e47a1ea5acf3c50063db8d0c29390 /usr.bin/vmstat | |
| parent | 2fa4aaa07ae543081335242b15a49863fa720660 (diff) | |
Notes
Diffstat (limited to 'usr.bin/vmstat')
| -rw-r--r-- | usr.bin/vmstat/vmstat.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 7f37b95a3548..6119fb7fba37 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.24 1998/07/06 21:01:54 bde Exp $"; + "$Id: vmstat.c,v 1.25 1998/09/15 08:16:43 gibbs Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -154,6 +154,7 @@ devstat_select_mode select_mode; struct vmmeter sum, osum; int winlines = 20; +int nflag = 0; kvm_t *kd; @@ -212,6 +213,7 @@ main(argc, argv) nlistf = optarg; break; case 'n': + nflag = 1; maxshowdevs = atoi(optarg); if (maxshowdevs < 0) errx(1, "number of devices %d is < 0", @@ -349,6 +351,9 @@ getdrivedata(argv) } dev_select = NULL; + if (nflag == 0 && maxshowdevs < num_devices_specified) + maxshowdevs = num_devices_specified; + /* * People are generally only interested in disk statistics when * they're running vmstat. So, that's what we're going to give |
