[PATCH 3/5] docs: add optional option back to struct option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The line was accidentally removed in the reference commit where only the
short option had to go.  Rest of the change is indentation.

Reference: 326c5c93b917a623f346155c8b3438b379d9fd60
Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 Documentation/boilerplate.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c
index 68ffbf7ea..a92f7f097 100644
--- a/Documentation/boilerplate.c
+++ b/Documentation/boilerplate.c
@@ -69,14 +69,15 @@ int main(int argc, char **argv)
 		OPT_OPTIONAL	/* see howto-man-page.txt about short option */
 	};
 	static const struct option longopts[] = {
-		{ "no-argument",                no_argument,       NULL, 'n'       },
-		{ "required",                   required_argument, NULL, 'r'       },
-		{ "extremely-long-long-option", no_argument,       NULL, 'e'       },
-		{ "xyzzy",                      no_argument,       NULL, OPT_XYZZY },
-		{ "long-explanation",           no_argument,       NULL, 'l'       },
-		{ "foobar",                     no_argument,       NULL, 'f'       },
-		{ "version",                    no_argument,       NULL, 'V'       },
-		{ "help",                       no_argument,       NULL, 'h'       },
+		{ "no-argument",                no_argument,       NULL, 'n'          },
+		{ "optional",                   optional_argument, NULL, OPT_OPTIONAL },
+		{ "required",                   required_argument, NULL, 'r'          },
+		{ "extremely-long-long-option", no_argument,       NULL, 'e'          },
+		{ "xyzzy",                      no_argument,       NULL, OPT_XYZZY    },
+		{ "long-explanation",           no_argument,       NULL, 'l'          },
+		{ "foobar",                     no_argument,       NULL, 'f'          },
+		{ "version",                    no_argument,       NULL, 'V'          },
+		{ "help",                       no_argument,       NULL, 'h'          },
 		{ NULL, 0, NULL, 0 }
 	};
 
-- 
2.13.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux