Package: open-iscsi / 2.0.874-3~deb9u1

bugfixes/fix_iscsiuio_long_options.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Description: Fix iscsiuio long options
Author: Andrew Patterson <andrew.patterson@hpe.com>
Bug: https://groups.google.com/forum/?_escaped_fragment_=msg/open-iscsi/PsT65Z4$
Bug-Debian: https://bugs.debian.org/850057
Last-Update: 2017-01-24
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/iscsiuio/src/unix/main.c
+++ b/iscsiuio/src/unix/main.c
@@ -82,10 +82,12 @@
  *  Global Variables
  ******************************************************************************/
 static const struct option long_options[] = {
-	{"debug", 0, 0, 0},
-	{"version", 0, 0, 0},
-	{"help", 0, 0, 0},
-	{0, 0, 0, 0}
+	{"foreground", no_argument, NULL, 'f'},
+	{"debug", required_argument, NULL, 'd'},
+	{"pid", required_argument, NULL, 'p'},
+	{"version", no_argument, NULL, 'v'},
+	{"help", no_argument, NULL, 'h'},
+	{NULL, no_argument, NULL, 0}
 };
 
 struct options opt = {
@@ -172,7 +174,7 @@
 	printf("iscsiuio daemon.\n"
 	       "-f, --foreground        make the program run in the foreground\n"
 	       "-d, --debug debuglevel  print debugging information\n"
-	       "-p, --pid=pidfile       use pid file (default  %s).\n"
+	       "-p, --pid pidfile       use pid file (default  %s).\n"
 	       "-h, --help              display this help and exit\n"
 	       "-v, --version           display version and exit\n",
 	       default_pid_filepath);
--- a/iscsiuio/docs/iscsiuio.8
+++ b/iscsiuio/docs/iscsiuio.8
@@ -45,7 +45,7 @@
 .SH PARAMETERS
 There are very few parameters when running this application.
 .TP
-.BI -d <debug level>
+.BI -d|--debug <debug level>
 This is to enable debug mode where debug messages will be sent to stdout
 The following debug modes are supported
 .P
@@ -61,20 +61,20 @@
 .PP
 .TP
 .TP
-.BI -f
+.BI -f|--foreground
 This is to enable foreground mode so that this application doesn't get sent
 into the background.
 .PP
 .TP
-.BI -v
+.BI -v|--version
 This is to print the version.
 .PP
 .TP
-.BI -p <pidfile>
+.BI -p|--pid <pidfile>
 Use pidfile (default  /var/run/iscsiuio.pid )
 .PP
 .TP
-.BI -h
+.BI -h|--help
 Display this help and exit.