From 6c104b5fe3ce6e6d7d6d091b3a4af25146ecfb17 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Fri, 1 Jan 2016 21:10:20 -0500 Subject: Keep it in alphabetical order --- other/bootstrap_daemon/src/command_line_arguments.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/other/bootstrap_daemon/src/command_line_arguments.c b/other/bootstrap_daemon/src/command_line_arguments.c index d5f301ee..187fa786 100644 --- a/other/bootstrap_daemon/src/command_line_arguments.c +++ b/other/bootstrap_daemon/src/command_line_arguments.c @@ -71,9 +71,9 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path, opterr = 0; static struct option long_options[] = { - {"help", no_argument, 0, 'h'}, {"config", required_argument, 0, 'c'}, // required option {"foreground", no_argument, 0, 'f'}, + {"help", no_argument, 0, 'h'}, {"log-backend", required_argument, 0, 'l'}, // optional, defaults to syslog {"version", no_argument, 0, 'v'}, {0, 0, 0, 0 } @@ -89,9 +89,6 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path, while ((opt = getopt_long(argc, argv, ":", long_options, NULL)) != -1) { switch (opt) { - case 'h': - print_help(); - exit(0); case 'c': *cfg_file_path = optarg; @@ -102,6 +99,10 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path, *run_in_foreground = true; break; + case 'h': + print_help(); + exit(0); + case 'l': if (strcmp(optarg, "syslog") == 0) { *log_backend = LOG_BACKEND_SYSLOG; -- cgit v1.2.3