Blame SOURCES/nfs-utils-1.3.0-nfsidmap-h-opt.patch

e19a30
diff -up nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.c.orig nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.c
e19a30
--- nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.c.orig	2016-06-08 09:59:09.920690710 -0400
e19a30
+++ nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.c	2016-06-08 11:22:01.104971559 -0400
e19a30
@@ -16,7 +16,7 @@
e19a30
 #include "conffile.h"
e19a30
 
e19a30
 int verbose = 0;
e19a30
-char *usage = "Usage: %s [-v] [-c || [-u|-g|-r key] || -d || -l || [-t timeout] key desc]";
e19a30
+char *usage = "Usage: %s [-vh] [-c || [-u|-g|-r key] || -d || -l || [-t timeout] key desc]";
e19a30
 
e19a30
 #define MAX_ID_LEN   11
e19a30
 #define IDMAP_NAMESZ 128
e19a30
@@ -355,7 +355,7 @@ int main(int argc, char **argv)
e19a30
 
e19a30
 	xlog_open(progname);
e19a30
 
e19a30
-	while ((opt = getopt(argc, argv, "du:g:r:ct:vl")) != -1) {
e19a30
+	while ((opt = getopt(argc, argv, "hdu:g:r:ct:vl")) != -1) {
e19a30
 		switch (opt) {
e19a30
 		case 'd':
e19a30
 			display++;
e19a30
@@ -384,9 +384,10 @@ int main(int argc, char **argv)
e19a30
 		case 't':
e19a30
 			timeout = atoi(optarg);
e19a30
 			break;
e19a30
+		case 'h':
e19a30
 		default:
e19a30
 			xlog_warn(usage, progname);
e19a30
-			break;
e19a30
+			exit(opt == 'h' ? 0 : 1);
e19a30
 		}
e19a30
 	}
e19a30
 
e19a30
diff -up nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.man.orig nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.man
e19a30
--- nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.man.orig	2016-06-08 09:59:09.899690366 -0400
e19a30
+++ nfs-utils-1.3.0/utils/nfsidmap/nfsidmap.man	2016-06-08 11:22:01.104971559 -0400
e19a30
@@ -15,6 +15,8 @@ nfsidmap \- The NFS idmapper upcall prog
e19a30
 .B "nfsidmap -d"
e19a30
 .br
e19a30
 .B "nfsidmap -l"
e19a30
+.br
e19a30
+.B "nfsidmap -h"
e19a30
 .SH DESCRIPTION
e19a30
 The NFSv4 protocol represents the local system's UID and GID values
e19a30
 on the wire as strings of the form
e19a30
@@ -71,6 +73,9 @@ Display the system's effective NFSv4 dom
e19a30
 .B -g user
e19a30
 Revoke the gid key of the given user.
e19a30
 .TP
e19a30
+.B -h
e19a30
+Display usage message.
e19a30
+.TP
e19a30
 .B -l
e19a30
 Display on
e19a30
 .I stdout