From bbc4a5345e94038d139df90a75a74b18def3ef49 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 30 Sep 2015 00:11:06 +0000 Subject: 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] --- usr.bin/vmstat/vmstat.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'usr.bin/vmstat/vmstat.c') 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); } -- cgit v1.1