From 97b72fdc537ee98a3ab11fd37160d91ee463f929 Mon Sep 17 00:00:00 2001 From: brooks Date: Tue, 20 Jun 2017 20:19:57 +0000 Subject: MFC r318968: Add missing usage and getopt(3) options - Add the missing option 'n' to the getopt(3) string - Add the missing options 'libxo' and 'N' to the usage message - Add the missing options 'M' and 'N' to the man-page Submitted by: Keegan Drake H.P. Differential Revision: https://reviews.freebsd.org/D10915 Approved by: re (gjb) --- usr.bin/procstat/procstat.1 | 4 +++- usr.bin/procstat/procstat.c | 9 +++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 index da09513..2ccfc69 100644 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 11, 2017 +.Dd June 20, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl -libxo .Op Fl CHhn +.Op Fl M Ar core +.Op Fl N Ar system .Op Fl w Ar interval .Op Fl b | c | e | f | i | j | k | l | r | s | S | t | v | x .Op Fl a | Ar pid | Ar core ... diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c index 0388ba0..627ca8b 100644 --- a/usr.bin/procstat/procstat.c +++ b/usr.bin/procstat/procstat.c @@ -49,10 +49,11 @@ static void usage(void) { - xo_error("usage: procstat [-CHhn] [-M core] [-N system] " - "[-w interval]\n" + xo_error("usage: procstat [--libxo] [-CHhn] [-M core] " + "[-N system] [-w interval]\n" " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -r | -s | -S | -t | -v | -x]\n" + "-l | -r | -s | \n" + " -S | -t | -v | -x]\n" " [-a | pid | core ...]\n"); xo_finish(); exit(EX_USAGE); @@ -161,7 +162,7 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); xocontainer = "basic"; - while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrsStvw:x")) != -1) { + while ((ch = getopt(argc, argv, "abCcefHhijklM:N:nrSstvw:x")) != -1) { switch (ch) { case 'C': Cflag++; -- cgit v1.1