summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/src
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2016-01-01 21:10:20 -0500
committerMaxim Biro <nurupo.contributions@gmail.com>2016-01-01 21:10:20 -0500
commit6c104b5fe3ce6e6d7d6d091b3a4af25146ecfb17 (patch)
treefb0b56f0b5b7784bb2fba6e899bf220609f75d80 /other/bootstrap_daemon/src
parentf74d7c5ae6a35265d6b92ed974758028da774583 (diff)
Keep it in alphabetical order
Diffstat (limited to 'other/bootstrap_daemon/src')
-rw-r--r--other/bootstrap_daemon/src/command_line_arguments.c9
1 files 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,
71 opterr = 0; 71 opterr = 0;
72 72
73 static struct option long_options[] = { 73 static struct option long_options[] = {
74 {"help", no_argument, 0, 'h'},
75 {"config", required_argument, 0, 'c'}, // required option 74 {"config", required_argument, 0, 'c'}, // required option
76 {"foreground", no_argument, 0, 'f'}, 75 {"foreground", no_argument, 0, 'f'},
76 {"help", no_argument, 0, 'h'},
77 {"log-backend", required_argument, 0, 'l'}, // optional, defaults to syslog 77 {"log-backend", required_argument, 0, 'l'}, // optional, defaults to syslog
78 {"version", no_argument, 0, 'v'}, 78 {"version", no_argument, 0, 'v'},
79 {0, 0, 0, 0 } 79 {0, 0, 0, 0 }
@@ -89,9 +89,6 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path,
89 while ((opt = getopt_long(argc, argv, ":", long_options, NULL)) != -1) { 89 while ((opt = getopt_long(argc, argv, ":", long_options, NULL)) != -1) {
90 90
91 switch (opt) { 91 switch (opt) {
92 case 'h':
93 print_help();
94 exit(0);
95 92
96 case 'c': 93 case 'c':
97 *cfg_file_path = optarg; 94 *cfg_file_path = optarg;
@@ -102,6 +99,10 @@ void handle_command_line_arguments(int argc, char *argv[], char **cfg_file_path,
102 *run_in_foreground = true; 99 *run_in_foreground = true;
103 break; 100 break;
104 101
102 case 'h':
103 print_help();
104 exit(0);
105
105 case 'l': 106 case 'l':
106 if (strcmp(optarg, "syslog") == 0) { 107 if (strcmp(optarg, "syslog") == 0) {
107 *log_backend = LOG_BACKEND_SYSLOG; 108 *log_backend = LOG_BACKEND_SYSLOG;