]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
docs: add optional option back to struct option
authorSami Kerola <kerolasa@iki.fi>
Wed, 28 Jun 2017 22:24:54 +0000 (23:24 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 15 Jul 2017 21:05:00 +0000 (22:05 +0100)
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@iki.fi>
Documentation/boilerplate.c

index 68ffbf7ea3b92fd23a049def711586fb0c883368..a92f7f097bb3c97eb35cb25d841becb6e031350e 100644 (file)
@@ -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 }
        };