diff options
author | Steve Dickson <steved@redhat.com> | 2016-01-20 14:41:58 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2016-01-20 14:41:58 -0500 |
commit | e57642c50c9b2e409d1fc2775bdf88f64b344dd3 (patch) | |
tree | 8f247fec3f2e888f6069da9a2f1624562e8545b2 | |
parent | 6ec0d58fbff7c1a814a21cf8c7fe0ef5106a04c1 (diff) | |
download | nfs-utils-e57642c50c9b2e409d1fc2775bdf88f64b344dd3.tar.gz nfs-utils-e57642c50c9b2e409d1fc2775bdf88f64b344dd3.tar.xz nfs-utils-e57642c50c9b2e409d1fc2775bdf88f64b344dd3.zip |
rpc.idmapd: Added the -h flag
In general the -h flag should at least show
a usage message
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/idmapd/idmapd.c | 7 | ||||
-rw-r--r-- | utils/idmapd/idmapd.man | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c index 910b02e..f4e083a 100644 --- a/utils/idmapd/idmapd.c +++ b/utils/idmapd/idmapd.c @@ -201,7 +201,7 @@ flush_nfsd_idmap_cache(void) void usage(char *progname) { - fprintf(stderr, "Usage: %s [-fvCS] [-p path] [-c path]\n", + fprintf(stderr, "Usage: %s [-hfvCS] [-p path] [-c path]\n", basename(progname)); } @@ -231,7 +231,7 @@ main(int argc, char **argv) progname = argv[0]; xlog_open(progname); -#define GETOPTSTR "vfd:p:U:G:c:CS" +#define GETOPTSTR "hvfd:p:U:G:c:CS" opterr=0; /* Turn off error messages */ while ((opt = getopt(argc, argv, GETOPTSTR)) != -1) { if (opt == 'c') @@ -284,6 +284,9 @@ main(int argc, char **argv) case 'S': clientstart = 0; break; + case 'h': + usage(progname); + exit(0); default: break; } diff --git a/utils/idmapd/idmapd.man b/utils/idmapd/idmapd.man index d45658e..b9200c7 100644 --- a/utils/idmapd/idmapd.man +++ b/utils/idmapd/idmapd.man @@ -10,6 +10,7 @@ .Sh SYNOPSIS .\" For a program: program [-abc] file ... .Nm rpc.idmapd +.Op Fl h .Op Fl f .Op Fl v .Op Fl C @@ -34,6 +35,8 @@ program. .Pp The options are as follows: .Bl -tag -width Ds_imagedir +.It Fl h +Display usage message. .It Fl v Increases the verbosity level (can be specified multiple times). .It Fl f |