summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-11-01 15:07:07 +0100
committerJustus Winter <justus@gnupg.org>2016-11-01 16:32:47 +0100
commit61f89952020ff1ff34e391ae78acd2da51476c41 (patch)
treebc688b0a924e70c7f3ea754ce324761198a8d57f /boot
parentdb94feece63e18364dd2c9228a6ef3452fe22cc2 (diff)
boot: Tidy up the argument parser.
* boot/boot.c (options): Group options together. Do not end help texts with a colon. (args_doc): Remove variable. (main): Group the store options together.
Diffstat (limited to 'boot')
-rw-r--r--boot/boot.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/boot/boot.c b/boot/boot.c
index 244988a5..db5c3964 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -221,6 +221,7 @@ const char *argp_program_version = STANDARD_HURD_VERSION (boot);
static struct argp_option options[] =
{
+ { NULL, 0, NULL, 0, "Boot options:" },
{ "boot-script", OPT_BOOT_SCRIPT, "BOOT-SCRIPT", 0,
"boot script to execute" },
{ "boot-root", 'D', "DIR", 0,
@@ -232,14 +233,13 @@ static struct argp_option options[] =
{ "pause" , 'd', 0, 0,
"Pause for user confirmation at various times during booting" },
{ "isig", 'I', 0, 0,
- "Do not disable terminal signals, so you can suspend and interrupt boot."},
+ "Do not disable terminal signals, so you can suspend and interrupt boot"},
{ "device", 'f', "device_name=device_file", 0,
- "Specify a device file used by subhurd and its virtual name."},
+ "Specify a device file used by subhurd and its virtual name"},
{ "privileged", OPT_PRIVILEGED, NULL, 0,
"Allow the subhurd to access privileged kernel ports"},
{ 0 }
};
-static char args_doc[] = "";
static char doc[] = "Boot a second hurd";
struct dev_map
@@ -461,8 +461,9 @@ main (int argc, char **argv, char **envp)
char *buf = 0;
pthread_t pthread_id;
char *root_store_name;
- const struct argp_child kids[] = { { &store_argp }, { 0 }};
- struct argp argp = { options, parse_opt, args_doc, doc, kids };
+ const struct argp_child kids[] = { { &store_argp, 0, "Store options:", -2 },
+ { 0 }};
+ struct argp argp = { options, parse_opt, NULL, doc, kids };
struct store_argp_params store_argp_params = { 0 };
argp_parse (&argp, argc, argv, 0, 0, &store_argp_params);