Blame SOURCES/nfs-utils-1.3.0-blkmapd-usage.patch

851484
diff -up nfs-utils-1.3.0/utils/blkmapd/blkmapd.man.save nfs-utils-1.3.0/utils/blkmapd/blkmapd.man
851484
--- nfs-utils-1.3.0/utils/blkmapd/blkmapd.man.save	2014-03-25 11:12:07.000000000 -0400
851484
+++ nfs-utils-1.3.0/utils/blkmapd/blkmapd.man	2016-05-17 14:12:08.000000000 -0400
851484
@@ -9,7 +9,7 @@
851484
 .SH NAME
851484
 blkmapd \- pNFS block layout mapping daemon
851484
 .SH SYNOPSIS
851484
-.B "blkmapd [-d] [-f]"
851484
+.B "blkmapd [-h] [-d] [-f]"
851484
 .SH DESCRIPTION
851484
 The
851484
 .B blkmapd
851484
@@ -33,6 +33,9 @@ reflect the server topology, and passes
851484
 by the pNFS block layout client.
851484
 .SH OPTIONS
851484
 .TP
851484
+.B -h
851484
+Display usage message.
851484
+.TP
851484
 .B -d
851484
 Performs device discovery only then exits.
851484
 .TP
851484
diff -up nfs-utils-1.3.0/utils/blkmapd/device-discovery.c.save nfs-utils-1.3.0/utils/blkmapd/device-discovery.c
851484
--- nfs-utils-1.3.0/utils/blkmapd/device-discovery.c.save	2016-05-17 14:11:36.000000000 -0400
851484
+++ nfs-utils-1.3.0/utils/blkmapd/device-discovery.c	2016-05-17 14:11:48.000000000 -0400
851484
@@ -427,7 +427,10 @@ void sig_die(int signal)
851484
 	BL_LOG_ERR("exit on signal(%d)\n", signal);
851484
 	exit(1);
851484
 }
851484
-
851484
+static void usage(void)
851484
+{
851484
+	fprintf(stderr, "Usage: blkmapd [-hdf]\n" );
851484
+}
851484
 /* Daemon */
851484
 int main(int argc, char **argv)
851484
 {
851484
@@ -435,7 +438,7 @@ int main(int argc, char **argv)
851484
 	struct stat statbuf;
851484
 	char pidbuf[64];
851484
 
851484
-	while ((opt = getopt(argc, argv, "df")) != -1) {
851484
+	while ((opt = getopt(argc, argv, "hdf")) != -1) {
851484
 		switch (opt) {
851484
 		case 'd':
851484
 			dflag = 1;
851484
@@ -443,6 +446,13 @@ int main(int argc, char **argv)
851484
 		case 'f':
851484
 			fg = 1;
851484
 			break;
851484
+		case 'h':
851484
+			usage();
851484
+			exit(0);
851484
+		default:
851484
+			usage();
851484
+			exit(1);
851484
+			
851484
 		}
851484
 	}
851484