summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/vmstat/vmstat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 7f37b95..6119fb7 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
OpenPOWER on IntegriCloud