From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] nfsidmap: added the -h option
Date: Wed, 8 Jun 2016 09:03:09 -0400 [thread overview]
Message-ID: <1465390989-10097-1-git-send-email-steved@redhat.com> (raw)
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/nfsidmap/nfsidmap.c | 7 +++++--
utils/nfsidmap/nfsidmap.man | 5 +++++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index 2abefe9..6e946ec 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -17,7 +17,7 @@
#include "conffile.h"
int verbose = 0;
-char *usage = "Usage: %s [-v] [-c || [-u|-g|-r key] || -d || -l || [-t timeout] key desc]";
+char *usage = "Usage: %s [-vh] [-c || [-u|-g|-r key] || -d || -l || [-t timeout] key desc]";
#define MAX_ID_LEN 11
#define IDMAP_NAMESZ 128
@@ -369,7 +369,7 @@ int main(int argc, char **argv)
xlog_open(progname);
- while ((opt = getopt(argc, argv, "du:g:r:ct:vl")) != -1) {
+ while ((opt = getopt(argc, argv, "hdu:g:r:ct:vl")) != -1) {
switch (opt) {
case 'd':
display++;
@@ -398,8 +398,11 @@ int main(int argc, char **argv)
case 't':
timeout = atoi(optarg);
break;
+ case 'h':
default:
xlog_warn(usage, progname);
+ if (opt == 'h')
+ exit(0);
break;
}
}
diff --git a/utils/nfsidmap/nfsidmap.man b/utils/nfsidmap/nfsidmap.man
index 0275bdf..2f17cf2 100644
--- a/utils/nfsidmap/nfsidmap.man
+++ b/utils/nfsidmap/nfsidmap.man
@@ -15,6 +15,8 @@ nfsidmap \- The NFS idmapper upcall program
.B "nfsidmap -d"
.br
.B "nfsidmap -l"
+.br
+.B "nfsidmap -h"
.SH DESCRIPTION
The NFSv4 protocol represents the local system's UID and GID values
on the wire as strings of the form
@@ -71,6 +73,9 @@ Display the system's effective NFSv4 domain name on
.B -g user
Revoke the gid key of the given user.
.TP
+.B -h
+Display usage message.
+.TP
.B -l
Display on
.I stdout
--
2.5.5
reply other threads:[~2016-06-08 13:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465390989-10097-1-git-send-email-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).