summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2015-09-30 00:11:06 +0000
committerjhb <jhb@FreeBSD.org>2015-09-30 00:11:06 +0000
commitbbc4a5345e94038d139df90a75a74b18def3ef49 (patch)
tree0b8524c29c7338ed3d2aa55216116bbd698ebea3 /usr.bin/vmstat/vmstat.c
parent4432171c468927656d824ab8ca27afe097004f6d (diff)
downloadFreeBSD-src-bbc4a5345e94038d139df90a75a74b18def3ef49.zip
FreeBSD-src-bbc4a5345e94038d139df90a75a74b18def3ef49.tar.gz
MFC 269727:
Update vmstat usage for last-argument count/wait parameters Correct the usage in both the manpage and in usage() to indicate that the wait interval and repetition count may be given either with the respective -w/-c arguments, or as the final positional arguments. [0] The corresponding code to implement the positional arguments has been conditional on the (always-enabled) BACKWARD_COMPATIBILITY macro since the original 4.4-lite import. It's no longer reasonable to remove the functionality, so remove the macro and conditional instead. Note that multiple disks may be given on the command line. While here, sort arguments and apply minor mdoc fixes. PR: 184755 [0]
Diffstat (limited to 'usr.bin/vmstat/vmstat.c')
-rw-r--r--usr.bin/vmstat/vmstat.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 24a3f2f..793fd9c 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -289,15 +289,12 @@ main(int argc, char *argv[])
argv = getdrivedata(argv);
}
-#define BACKWARD_COMPATIBILITY
-#ifdef BACKWARD_COMPATIBILITY
if (*argv) {
f = atof(*argv);
interval = f * 1000;
if (*++argv)
reps = atoi(*argv);
}
-#endif
if (interval) {
if (!reps)
@@ -1354,7 +1351,7 @@ static void
usage(void)
{
(void)fprintf(stderr, "%s%s",
- "usage: vmstat [-afHhimPsz] [-c count] [-M core [-N system]] [-w wait]\n",
- " [-n devs] [-p type,if,pass] [disks]\n");
+ "usage: vmstat [-afHhimPsz] [-M core [-N system]] [-c count] [-n devs]\n",
+ " [-p type,if,pass] [-w wait] [disks] [wait [count]]\n");
exit(1);
}
OpenPOWER on IntegriCloud