From: Sami Kerola Date: Wed, 28 Jun 2017 22:24:54 +0000 (+0100) Subject: docs: add optional option back to struct option X-Git-Tag: v2.31-rc1~195^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f636ef1f4174dd4fb70fa8830aaceae9385c927d;p=thirdparty%2Futil-linux.git docs: add optional option back to struct option 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 --- diff --git a/Documentation/boilerplate.c b/Documentation/boilerplate.c index 68ffbf7ea3..a92f7f097b 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 } };