1 /*****************************************************************************\
2 * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $
3 *****************************************************************************
4 * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC.
5 * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
6 * Written by Albert Chu <chu11@llnl.gov>
7 * LLNL-CODE-559172
8 *
9 * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon.
10 * For details, see http://www.llnl.gov/linux/.
11 *
12 * Ipmiseld is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 3 of the License, or (at your
15 * option) any later version.
16 *
17 * Ipmiseld is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * for more details.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with Ipmiseld. If not, see <http://www.gnu.org/licenses/>.
24 \*****************************************************************************/
25
26 #if HAVE_CONFIG_H
27 #include "config.h"
28 #endif /* HAVE_CONFIG_H */
29
30 #include <stdio.h>
31 #include <stdlib.h>
32 #if STDC_HEADERS
33 #include <string.h>
34 #endif /* STDC_HEADERS */
35 #if HAVE_UNISTD_H
36 #include <unistd.h>
37 #endif /* HAVE_UNISTD_H */
38 #if HAVE_ARGP_H
39 #include <argp.h>
40 #else /* !HAVE_ARGP_H */
41 #include "freeipmi-argp.h"
42 #endif /* !HAVE_ARGP_H */
43 #include <assert.h>
44
45 #include "ipmiseld.h"
46 #include "ipmiseld-argp.h"
47 #include "ipmiseld-common.h"
48
49 #include "freeipmi-portability.h"
50 #include "tool-cmdline-common.h"
51 #include "tool-config-file-common.h"
52 #include "error.h"
53
54 const char *argp_program_version =
55 "ipmiseld - " PACKAGE_VERSION "\n"
56 "Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC.\n"
57 "This program is free software; you may redistribute it under the terms of\n"
58 "the GNU General Public License. This program has absolutely no warranty.";
59
60 const char *argp_program_bug_address =
61 "<" PACKAGE_BUGREPORT ">";
62
63 static char cmdline_doc[] =
64 "ipmiseld - IPMI SEL syslog logging daemon";
65
66 static char cmdline_args_doc[] = "";
67
68 static struct argp_option cmdline_options[] =
69 {
70 ARGP_COMMON_OPTIONS_DRIVER,
71 ARGP_COMMON_OPTIONS_INBAND,
72 ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED,
73 ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE,
74 ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID,
75 ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL,
76 ARGP_COMMON_OPTIONS_CONFIG_FILE,
77 ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS,
78 ARGP_COMMON_OPTIONS_DEBUG,
79 { "verbose", IPMISELD_VERBOSE_KEY, 0, 0,
80 "Increase verbosity in output.", 40},
81 { "sensor-types", IPMISELD_SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0,
82 "Show sensors of a specific type.", 41},
83 { "exclude-sensor-types", IPMISELD_EXCLUDE_SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0,
84 "Do not show sensors of a specific type.", 42},
85 { "system-event-only", IPMISELD_SYSTEM_EVENT_ONLY_KEY, 0, 0,
86 "Output only system event records (i.e. don't output OEM records).", 43},
87 { "oem-event-only", IPMISELD_OEM_EVENT_ONLY_KEY, 0, 0,
88 "Output only OEM event records.", 44},
89 { "event-state-config-file", IPMISELD_EVENT_STATE_CONFIG_FILE_KEY, "FILE", 0,
90 "Specify an alternate event state configuration file.", 45},
91 { "interpret-oem-data", IPMISELD_INTERPRET_OEM_DATA_KEY, NULL, 0,
92 "Attempt to interpret OEM data.", 46},
93 { "output-oem-event-strings", IPMISELD_OUTPUT_OEM_EVENT_STRINGS_KEY, NULL, 0,
94 "Attempt to output OEM event strings.", 47},
95 { "entity-sensor-names", IPMISELD_ENTITY_SENSOR_NAMES_KEY, NULL, 0,
96 "Output sensor names with entity ids and instances.", 48},
97 { "non-abbreviated-units", IPMISELD_NON_ABBREVIATED_UNITS_KEY, 0, 0,
98 "Output non-abbreviated units (e.g. 'Amps' instead of 'A').", 49},
99 { "event-state-filter", IPMISELD_EVENT_STATE_FILTER_KEY, "FILTERSTRING", 0,
100 "Specify event states to filter out and not log.", 50},
101 { "warning-threshold", IPMISELD_WARNING_THRESHOLD_KEY, "PERCENTINT", 0,
102 "Specify SEL fullness warning threshold as an integer percentage.", 51},
103 { "clear-threshold", IPMISELD_CLEAR_THRESHOLD_KEY, "PERCENTINT", 0,
104 "Specify SEL fullness clear threshold as an integer percentage.", 52},
105 { "system-event-format", IPMISELD_SYSTEM_EVENT_FORMAT_KEY, "FORMATSTRING", 0,
106 "Specify format for system event outputs.", 53},
107 { "oem-timestamped-event-format", IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_KEY, "FORMATSTRING", 0,
108 "Specify format for oem timestamped event outputs.", 54},
109 { "oem-non-timestamped-event-format", IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_KEY, "FORMATSTRING", 0,
110 "Specify format for oem non-timestamped event outputs.", 55},
111 { "poll-interval", IPMISELD_POLL_INTERVAL_KEY, "SECONDS", 0,
112 "Specify poll interval to check the SEL for new events.", 56},
113 { "log-facility", IPMISELD_LOG_FACILITY_KEY, "STRING", 0,
114 "Specify syslog log facility.", 57},
115 { "log-priority", IPMISELD_LOG_PRIORITY_KEY, "STRING", 0,
116 "Specify syslog log priority.", 58},
117 { "cache-directory", IPMISELD_CACHE_DIRECTORY_KEY, "DIRECTORY", 0,
118 "Specify alternate cache directory.", 59},
119 { "ignore-sdr", IPMISELD_IGNORE_SDR_KEY, 0, 0,
120 "Ignore SDR related processing.", 60},
121 { "re-download-sdr", IPMISELD_RE_DOWNLOAD_SDR_KEY, 0, 0,
122 "Re-download the SDR even if it is not out of date.", 61},
123 { "clear-sel", IPMISELD_CLEAR_SEL_KEY, 0, 0,
124 "Clear SEL on startup.", 62},
125 { "threadpool-count", IPMISELD_THREADPOOL_COUNT_KEY, "NUM", 0,
126 "Specify threadpool count for parallel SEL polling.", 63},
127 { "test-run", IPMISELD_TEST_RUN_KEY, 0, 0,
128 "Do not daemonize, output current SEL as test of current settings.", 64},
129 { "foreground", IPMISELD_FOREGROUND_KEY, 0, 0,
130 "Run daemon in foreground.", 65},
131 { NULL, 0, NULL, 0, NULL, 0}
132 };
133
134 static error_t cmdline_parse (int key, char *arg, struct argp_state *state);
135
136 static struct argp cmdline_argp = { cmdline_options,
137 cmdline_parse,
138 cmdline_args_doc,
139 cmdline_doc };
140
141 static struct argp cmdline_config_file_argp = { cmdline_options,
142 cmdline_config_file_parse,
143 cmdline_args_doc,
144 cmdline_doc };
145
146 static error_t
cmdline_parse(int key,char * arg,struct argp_state * state)147 cmdline_parse (int key, char *arg, struct argp_state *state)
148 {
149 struct ipmiseld_arguments *cmd_args;
150 char *endptr;
151 int tmp;
152
153 assert (state);
154
155 cmd_args = state->input;
156
157 switch (key)
158 {
159 case IPMISELD_VERBOSE_KEY:
160 cmd_args->verbose_count++;
161 break;
162 case IPMISELD_SENSOR_TYPES_KEY:
163 if (parse_sensor_types (SENSOR_PARSE_ALL_STRING,
164 cmd_args->sensor_types,
165 &(cmd_args->sensor_types_length),
166 arg) < 0)
167 exit (EXIT_FAILURE);
168 break;
169 case IPMISELD_EXCLUDE_SENSOR_TYPES_KEY:
170 if (parse_sensor_types (SENSOR_PARSE_NONE_STRING,
171 cmd_args->exclude_sensor_types,
172 &(cmd_args->exclude_sensor_types_length),
173 arg) < 0)
174 exit (EXIT_FAILURE);
175 break;
176 case IPMISELD_SYSTEM_EVENT_ONLY_KEY:
177 cmd_args->system_event_only = 1;
178 break;
179 case IPMISELD_OEM_EVENT_ONLY_KEY:
180 cmd_args->oem_event_only = 1;
181 break;
182 case IPMISELD_EVENT_STATE_CONFIG_FILE_KEY:
183 if (!(cmd_args->event_state_config_file = strdup (arg)))
184 {
185 perror ("strdup");
186 exit (EXIT_FAILURE);
187 }
188 break;
189 case IPMISELD_INTERPRET_OEM_DATA_KEY:
190 cmd_args->interpret_oem_data = 1;
191 break;
192 case IPMISELD_OUTPUT_OEM_EVENT_STRINGS_KEY:
193 cmd_args->output_oem_event_strings = 1;
194 break;
195 case IPMISELD_ENTITY_SENSOR_NAMES_KEY:
196 cmd_args->entity_sensor_names = 1;
197 break;
198 case IPMISELD_NON_ABBREVIATED_UNITS_KEY:
199 cmd_args->non_abbreviated_units = 1;
200 break;
201 case IPMISELD_EVENT_STATE_FILTER_KEY:
202 if (!(cmd_args->event_state_filter_str = strdup (arg)))
203 {
204 perror ("strdup");
205 exit (EXIT_FAILURE);
206 }
207 break;
208 case IPMISELD_WARNING_THRESHOLD_KEY:
209 errno = 0;
210 tmp = strtol (arg, &endptr, 0);
211 if (errno
212 || endptr[0] != '\0'
213 || tmp < 0
214 || tmp > 100)
215 {
216 fprintf (stderr, "invalid warning threshold\n");
217 exit (EXIT_FAILURE);
218 }
219 cmd_args->warning_threshold = tmp;
220 break;
221 case IPMISELD_CLEAR_THRESHOLD_KEY:
222 errno = 0;
223 tmp = strtol (arg, &endptr, 0);
224 if (errno
225 || endptr[0] != '\0'
226 || tmp < 0
227 || tmp > 100)
228 {
229 fprintf (stderr, "invalid clear threshold\n");
230 exit (EXIT_FAILURE);
231 }
232 cmd_args->clear_threshold = tmp;
233 break;
234 case IPMISELD_SYSTEM_EVENT_FORMAT_KEY:
235 if (!(cmd_args->system_event_format_str = strdup (arg)))
236 {
237 perror ("strdup");
238 exit (EXIT_FAILURE);
239 }
240 break;
241 case IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_KEY:
242 if (!(cmd_args->oem_timestamped_event_format_str = strdup (arg)))
243 {
244 perror ("strdup");
245 exit (EXIT_FAILURE);
246 }
247 break;
248 case IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_KEY:
249 if (!(cmd_args->oem_non_timestamped_event_format_str = strdup (arg)))
250 {
251 perror ("strdup");
252 exit (EXIT_FAILURE);
253 }
254 break;
255 case IPMISELD_POLL_INTERVAL_KEY:
256 errno = 0;
257 tmp = strtol (arg, &endptr, 0);
258 if (errno
259 || endptr[0] != '\0'
260 || tmp <= 0)
261 {
262 fprintf (stderr, "invalid poll interval\n");
263 exit (EXIT_FAILURE);
264 }
265 cmd_args->poll_interval = tmp;
266 break;
267 case IPMISELD_LOG_FACILITY_KEY:
268 if (!(cmd_args->log_facility_str = strdup (arg)))
269 {
270 perror ("strdup");
271 exit (EXIT_FAILURE);
272 }
273 break;
274 case IPMISELD_LOG_PRIORITY_KEY:
275 if (!(cmd_args->log_priority_str = strdup (arg)))
276 {
277 perror ("strdup");
278 exit (EXIT_FAILURE);
279 }
280 break;
281 case IPMISELD_CACHE_DIRECTORY_KEY:
282 if (!(cmd_args->cache_directory = strdup (arg)))
283 {
284 perror ("strdup");
285 exit (EXIT_FAILURE);
286 }
287 break;
288 case IPMISELD_IGNORE_SDR_KEY:
289 cmd_args->ignore_sdr = 1;
290 break;
291 case IPMISELD_RE_DOWNLOAD_SDR_KEY:
292 cmd_args->re_download_sdr = 1;
293 break;
294 case IPMISELD_CLEAR_SEL_KEY:
295 cmd_args->clear_sel = 1;
296 break;
297 case IPMISELD_THREADPOOL_COUNT_KEY:
298 errno = 0;
299 tmp = strtol (arg, &endptr, 0);
300 if (errno
301 || endptr[0] != '\0'
302 || tmp <= 0)
303 {
304 fprintf (stderr, "invalid threadpool count\n");
305 exit (EXIT_FAILURE);
306 }
307 cmd_args->threadpool_count = tmp;
308 break;
309 case IPMISELD_TEST_RUN_KEY:
310 cmd_args->test_run = 1;
311 break;
312 case IPMISELD_FOREGROUND_KEY:
313 cmd_args->foreground = 1;
314 break;
315 case ARGP_KEY_ARG:
316 /* Too many arguments. */
317 argp_usage (state);
318 break;
319 case ARGP_KEY_END:
320 break;
321 default:
322 return (common_parse_opt (key, arg, &(cmd_args->common_args)));
323 }
324
325 return (0);
326 }
327
328 static void
_ipmiseld_config_file_parse(struct ipmiseld_arguments * cmd_args)329 _ipmiseld_config_file_parse (struct ipmiseld_arguments *cmd_args)
330 {
331 struct config_file_data_ipmiseld config_file_data;
332 char *filename;
333 int no_error_if_not_found;
334
335 assert (cmd_args);
336
337 memset (&config_file_data,
338 '\0',
339 sizeof (struct config_file_data_ipmiseld));
340
341 /* Force use of ipmiseld config file, we don't want the standard freeipmi one */
342 if (cmd_args->common_args.config_file)
343 {
344 filename = cmd_args->common_args.config_file;
345 no_error_if_not_found = 0;
346 }
347 else
348 {
349 filename = IPMISELD_CONFIG_FILE_DEFAULT;
350 no_error_if_not_found = 1;
351 }
352
353 /* if returns < 0, file not found
354 * will exit on fatal error within func
355 */
356 if (config_file_parse (filename,
357 no_error_if_not_found,
358 &(cmd_args->common_args),
359 CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND,
360 CONFIG_FILE_TOOL_IPMISELD,
361 &config_file_data) < 0)
362 return;
363
364 /* normally require user to input on command line, but because this
365 * is a daemon, we allow hostname config */
366 if (config_file_data.hostname_count)
367 cmd_args->common_args.hostname = config_file_data.hostname;
368 if (config_file_data.verbose_count_count)
369 cmd_args->verbose_count = config_file_data.verbose_count;
370 if (config_file_data.sensor_types_count && config_file_data.sensor_types_length)
371 {
372 unsigned int i;
373
374 assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES);
375 assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH);
376
377 for (i = 0; i < config_file_data.sensor_types_length; i++)
378 strncpy (cmd_args->sensor_types[i],
379 config_file_data.sensor_types[i],
380 MAX_SENSOR_TYPES_STRING_LENGTH);
381 cmd_args->sensor_types_length = config_file_data.sensor_types_length;
382 }
383 if (config_file_data.exclude_sensor_types_count && config_file_data.exclude_sensor_types_length)
384 {
385 unsigned int i;
386
387 assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES);
388 assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH);
389
390 for (i = 0; i < config_file_data.exclude_sensor_types_length; i++)
391 strncpy (cmd_args->exclude_sensor_types[i],
392 config_file_data.exclude_sensor_types[i],
393 MAX_SENSOR_TYPES_STRING_LENGTH);
394 cmd_args->exclude_sensor_types_length = config_file_data.exclude_sensor_types_length;
395 }
396 if (config_file_data.system_event_only_count)
397 cmd_args->system_event_only = config_file_data.system_event_only;
398 if (config_file_data.oem_event_only_count)
399 cmd_args->oem_event_only = config_file_data.oem_event_only;
400 if (config_file_data.event_state_config_file_count)
401 cmd_args->event_state_config_file = config_file_data.event_state_config_file;
402 if (config_file_data.interpret_oem_data_count)
403 cmd_args->interpret_oem_data = config_file_data.interpret_oem_data;
404 if (config_file_data.output_oem_event_strings_count)
405 cmd_args->output_oem_event_strings = config_file_data.output_oem_event_strings;
406 if (config_file_data.entity_sensor_names_count)
407 cmd_args->entity_sensor_names = config_file_data.entity_sensor_names;
408 if (config_file_data.non_abbreviated_units_count)
409 cmd_args->non_abbreviated_units = config_file_data.non_abbreviated_units;
410 if (config_file_data.event_state_filter_str_count)
411 cmd_args->event_state_filter_str = config_file_data.event_state_filter_str;
412 if (config_file_data.warning_threshold_count)
413 cmd_args->warning_threshold = config_file_data.warning_threshold;
414 if (config_file_data.clear_threshold_count)
415 cmd_args->clear_threshold = config_file_data.clear_threshold;
416 if (config_file_data.system_event_format_str_count)
417 cmd_args->system_event_format_str = config_file_data.system_event_format_str;
418 if (config_file_data.oem_timestamped_event_format_str_count)
419 cmd_args->oem_timestamped_event_format_str = config_file_data.oem_timestamped_event_format_str;
420 if (config_file_data.oem_non_timestamped_event_format_str_count)
421 cmd_args->oem_non_timestamped_event_format_str = config_file_data.oem_non_timestamped_event_format_str;
422 if (config_file_data.poll_interval_count)
423 cmd_args->poll_interval = config_file_data.poll_interval;
424 if (config_file_data.log_facility_str_count)
425 cmd_args->log_facility_str = config_file_data.log_facility_str;
426 if (config_file_data.log_priority_str_count)
427 cmd_args->log_priority_str = config_file_data.log_priority_str;
428 if (config_file_data.cache_directory_count)
429 cmd_args->cache_directory = config_file_data.cache_directory;
430 if (config_file_data.ignore_sdr_count)
431 cmd_args->ignore_sdr = config_file_data.ignore_sdr;
432 if (config_file_data.re_download_sdr_count)
433 cmd_args->re_download_sdr = config_file_data.re_download_sdr;
434 if (config_file_data.clear_sel_count)
435 cmd_args->clear_sel = config_file_data.clear_sel;
436 if (config_file_data.threadpool_count_count)
437 cmd_args->threadpool_count = config_file_data.threadpool_count;
438 }
439
440 static void
_ipmiseld_args_validate(struct ipmiseld_arguments * cmd_args)441 _ipmiseld_args_validate (struct ipmiseld_arguments *cmd_args)
442 {
443 assert (cmd_args);
444
445 if (cmd_args->sensor_types_length)
446 {
447 if (valid_sensor_types (cmd_args->sensor_types,
448 cmd_args->sensor_types_length) < 0)
449 exit (EXIT_FAILURE);
450 }
451
452 if (cmd_args->exclude_sensor_types_length)
453 {
454 if (valid_sensor_types (cmd_args->exclude_sensor_types,
455 cmd_args->exclude_sensor_types_length) < 0)
456 exit (EXIT_FAILURE);
457 }
458
459 if (cmd_args->event_state_filter_str)
460 {
461 if (ipmiseld_event_state_filter_parse (cmd_args->event_state_filter_str) < 0)
462 err_exit ("Invalid event state filter specified\n");
463 }
464
465 if (cmd_args->log_facility_str)
466 {
467 if (ipmiseld_log_facility_parse (cmd_args->log_facility_str) < 0)
468 err_exit ("Invalid log facility specified\n");
469 }
470
471 if (cmd_args->log_priority_str)
472 {
473 if (ipmiseld_log_priority_parse (cmd_args->log_priority_str) < 0)
474 err_exit ("Invalid log priority specified\n");
475 }
476
477 if (cmd_args->cache_directory)
478 {
479 if (access (cmd_args->cache_directory, R_OK|W_OK|X_OK) < 0)
480 {
481 err_exit ("insufficient permission on cache directory '%s'",
482 cmd_args->cache_directory);
483 exit (EXIT_FAILURE);
484 }
485 }
486 }
487
488 void
ipmiseld_argp_parse(int argc,char ** argv,struct ipmiseld_arguments * cmd_args)489 ipmiseld_argp_parse (int argc, char **argv, struct ipmiseld_arguments *cmd_args)
490 {
491 unsigned int i;
492
493 assert (argc >= 0);
494 assert (argv);
495 assert (cmd_args);
496
497 init_common_cmd_args_operator (&(cmd_args->common_args));
498
499 cmd_args->verbose_count = 0;
500
501 for (i = 0; i < MAX_SENSOR_TYPES; i++)
502 memset (cmd_args->sensor_types[i],
503 '\0',
504 MAX_SENSOR_TYPES_STRING_LENGTH+1);
505 cmd_args->sensor_types_length = 0;
506
507 for (i = 0; i < MAX_SENSOR_TYPES; i++)
508 memset (cmd_args->exclude_sensor_types[i],
509 '\0',
510 MAX_SENSOR_TYPES_STRING_LENGTH+1);
511 cmd_args->exclude_sensor_types_length = 0;
512
513 cmd_args->system_event_only = 0;
514 cmd_args->oem_event_only = 0;
515 cmd_args->event_state_config_file = NULL;
516 cmd_args->interpret_oem_data = 0;
517 cmd_args->output_oem_event_strings = 0;
518 cmd_args->entity_sensor_names = 0;
519 cmd_args->non_abbreviated_units = 0;
520 cmd_args->event_state_filter_str = NULL;
521 cmd_args->warning_threshold = IPMISELD_WARNING_THRESHOLD_DEFAULT;
522 cmd_args->clear_threshold = IPMISELD_CLEAR_THRESHOLD_DEFAULT;
523 cmd_args->system_event_format_str = NULL;
524 cmd_args->oem_timestamped_event_format_str = NULL;
525 cmd_args->oem_non_timestamped_event_format_str = NULL;
526 cmd_args->poll_interval = IPMISELD_POLL_INTERVAL_DEFAULT;
527 cmd_args->log_facility_str = NULL;
528 cmd_args->log_priority_str = NULL;
529 cmd_args->cache_directory = NULL;
530 cmd_args->ignore_sdr = 0;
531 cmd_args->re_download_sdr = 0;
532 cmd_args->clear_sel = 0;
533 cmd_args->threadpool_count = IPMISELD_THREADPOOL_COUNT;
534 cmd_args->test_run = 0;
535 cmd_args->foreground = 0;
536
537 argp_parse (&cmdline_config_file_argp,
538 argc,
539 argv,
540 ARGP_IN_ORDER,
541 NULL,
542 &(cmd_args->common_args));
543
544 _ipmiseld_config_file_parse (cmd_args);
545
546 argp_parse (&cmdline_argp,
547 argc,
548 argv,
549 ARGP_IN_ORDER,
550 NULL,
551 cmd_args);
552
553 verify_common_cmd_args (&(cmd_args->common_args));
554 _ipmiseld_args_validate (cmd_args);
555 }
556