You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

60 lines
1.6 KiB

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