|
|
47585c |
From 06851794fe0475410f516e874ee0c67db4a6784a Mon Sep 17 00:00:00 2001
|
|
|
47585c |
From: Andrew Patterson <andrew.patterson@hpe.com>
|
|
|
47585c |
Date: Wed, 31 May 2017 10:30:21 -0600
|
|
|
47585c |
Subject: [PATCH] iscsiuio: fix long options
|
|
|
47585c |
|
|
|
47585c |
Fix broken long command-line options in iscsiuio.
|
|
|
47585c |
---
|
|
|
47585c |
iscsiuio/docs/iscsiuio.8 | 10 +++++-----
|
|
|
47585c |
iscsiuio/src/unix/main.c | 12 +++++++-----
|
|
|
47585c |
2 files changed, 12 insertions(+), 10 deletions(-)
|
|
|
47585c |
|
|
|
47585c |
diff --git a/iscsiuio/docs/iscsiuio.8 b/iscsiuio/docs/iscsiuio.8
|
|
|
47585c |
index 8b0577a53842..eda20c76637f 100644
|
|
|
47585c |
--- a/iscsiuio/docs/iscsiuio.8
|
|
|
47585c |
+++ b/iscsiuio/docs/iscsiuio.8
|
|
|
47585c |
@@ -45,7 +45,7 @@ on how to configure network protocol and address.
|
|
|
47585c |
.SH PARAMETERS
|
|
|
47585c |
There are very few parameters when running this application.
|
|
|
47585c |
.TP
|
|
|
47585c |
-.BI -d <debug level>
|
|
|
47585c |
+.BI -d|--debug <debug level>
|
|
|
47585c |
This is to enable debug mode where debug messages will be sent to stdout
|
|
|
47585c |
The following debug modes are supported
|
|
|
47585c |
.P
|
|
|
47585c |
@@ -61,20 +61,20 @@ ERROR 1 - Only print critical errors
|
|
|
47585c |
.PP
|
|
|
47585c |
.TP
|
|
|
47585c |
.TP
|
|
|
47585c |
-.BI -f
|
|
|
47585c |
+.BI -f|--foreground
|
|
|
47585c |
This is to enable foreground mode so that this application doesn't get sent
|
|
|
47585c |
into the background.
|
|
|
47585c |
.PP
|
|
|
47585c |
.TP
|
|
|
47585c |
-.BI -v
|
|
|
47585c |
+.BI -v|--version
|
|
|
47585c |
This is to print the version.
|
|
|
47585c |
.PP
|
|
|
47585c |
.TP
|
|
|
47585c |
-.BI -p <pidfile>
|
|
|
47585c |
+.BI -p|--pid <pidfile>
|
|
|
47585c |
Use pidfile (default /var/run/iscsiuio.pid )
|
|
|
47585c |
.PP
|
|
|
47585c |
.TP
|
|
|
47585c |
-.BI -h
|
|
|
47585c |
+.BI -h|--help
|
|
|
47585c |
Display this help and exit.
|
|
|
47585c |
|
|
|
47585c |
|
|
|
47585c |
diff --git a/iscsiuio/src/unix/main.c b/iscsiuio/src/unix/main.c
|
|
|
47585c |
index c1a72d800741..5cccc76ed220 100644
|
|
|
47585c |
--- a/iscsiuio/src/unix/main.c
|
|
|
47585c |
+++ b/iscsiuio/src/unix/main.c
|
|
|
47585c |
@@ -82,10 +82,12 @@ static const char default_pid_filepath[] = "/var/run/iscsiuio.pid";
|
|
|
47585c |
* Global Variables
|
|
|
47585c |
******************************************************************************/
|
|
|
47585c |
static const struct option long_options[] = {
|
|
|
47585c |
- {"debug", 0, 0, 0},
|
|
|
47585c |
- {"version", 0, 0, 0},
|
|
|
47585c |
- {"help", 0, 0, 0},
|
|
|
47585c |
- {0, 0, 0, 0}
|
|
|
47585c |
+ {"foreground", no_argument, NULL, 'f'},
|
|
|
47585c |
+ {"debug", required_argument, NULL, 'd'},
|
|
|
47585c |
+ {"pid", required_argument, NULL, 'p'},
|
|
|
47585c |
+ {"version", no_argument, NULL, 'v'},
|
|
|
47585c |
+ {"help", no_argument, NULL, 'h'},
|
|
|
47585c |
+ {NULL, no_argument, NULL, 0}
|
|
|
47585c |
};
|
|
|
47585c |
|
|
|
47585c |
struct options opt = {
|
|
|
47585c |
@@ -172,7 +174,7 @@ static void main_usage()
|
|
|
47585c |
printf("iscsiuio daemon.\n"
|
|
|
47585c |
"-f, --foreground make the program run in the foreground\n"
|
|
|
47585c |
"-d, --debug debuglevel print debugging information\n"
|
|
|
47585c |
- "-p, --pid=pidfile use pid file (default %s).\n"
|
|
|
47585c |
+ "-p, --pid pidfile use pid file (default %s).\n"
|
|
|
47585c |
"-h, --help display this help and exit\n"
|
|
|
47585c |
"-v, --version display version and exit\n",
|
|
|
47585c |
default_pid_filepath);
|
|
|
47585c |
--
|
|
|
47585c |
2.17.2
|
|
|
47585c |
|