aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authorBenjamin Kaduk <bjk@FreeBSD.org>2014-08-08 16:32:06 +0000
committerBenjamin Kaduk <bjk@FreeBSD.org>2014-08-08 16:32:06 +0000
commite1ba604a96e3aab8d87a4561258a945df362f85f (patch)
tree71c25d3ee20caee922f9dae484c3e1c8398ccc0f /usr.bin/vmstat/vmstat.c
parent1216eb332082ab553832b45238985b3d6a2c9dce (diff)
downloadsrc-e1ba604a96e3aab8d87a4561258a945df362f85f.tar.gz
src-e1ba604a96e3aab8d87a4561258a945df362f85f.zip
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] Approved by: hrs (mentor, src committer)
Notes
Notes: svn path=/head/; revision=269727
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 67f438efbc5f..227f3c26adc2 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -299,15 +299,12 @@ retry_nlist:
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)
@@ -1360,7 +1357,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);
}