Util-Linux package development
 help / color / mirror / Atom feed
From: Sami Kerola <kerolasa@iki.fi>
To: util-linux@vger.kernel.org
Cc: Sami Kerola <kerolasa@iki.fi>
Subject: [PATCH 3/5] docs: add optional option back to struct option
Date: Sat, 15 Jul 2017 22:20:44 +0100	[thread overview]
Message-ID: <20170715212046.1655-4-kerolasa@iki.fi> (raw)
In-Reply-To: <20170715212046.1655-1-kerolasa@iki.fi>

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 | 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


  parent reply	other threads:[~2017-07-15 21:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-15 21:20 [PATCH 0/5] pull: five mutually unrelated changes Sami Kerola
2017-07-15 21:20 ` [PATCH 1/5] reset: remove script from the package Sami Kerola
2017-07-15 21:20 ` [PATCH 2/5] ldattach: simplify debugging function when vwarnx(3) is available Sami Kerola
2017-07-15 21:20 ` Sami Kerola [this message]
2017-07-15 21:20 ` [PATCH 4/5] uuidparse: add bash-completion file Sami Kerola
2017-07-15 21:20 ` [PATCH 5/5] bash-completion: make completions to work when bash set -u is in use Sami Kerola
2017-07-15 22:45 ` [PATCH 0/5] pull: five mutually unrelated changes Bruce Dubbs
2017-07-16  9:08   ` Sami Kerola
2017-07-16 15:25     ` Bruce Dubbs
2017-07-17  9:28       ` Karel Zak
2017-07-17 10:04 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170715212046.1655-4-kerolasa@iki.fi \
    --to=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox