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

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