MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / main

Function main

lrmd/test.c:427–581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427int
428main(int argc, char **argv)
429{
430 int option_index = 0;
431 int argerr = 0;
432 int flag;
433 char *key = NULL;
434 char *val = NULL;
435 crm_trigger_t *trig;
436
437 crm_set_options(NULL, "mode [options]", long_options,
438 "Inject commands into the lrmd and watch for events\n");
439
440 while (1) {
441 flag = crm_get_option(argc, argv, &option_index);
442 if (flag == -1)
443 break;
444
445 switch (flag) {
446 case '?':
447 crm_help(flag, EX_OK);
448 break;
449 case 'V':
450 options.verbose = 1;
451 break;
452 case 'Q':
453 options.quiet = 1;
454 options.verbose = 0;
455 break;
456 case 'l':
457 options.listen = optarg;
458 break;
459 case 'w':
460 options.no_wait = 1;
461 break;
462 case 'R':
463 options.is_running = 1;
464 break;
465 case 'n':
466 exec_call_opts = lrmd_opt_notify_orig_only;
467 break;
468 case 'o':
469 exec_call_opts = lrmd_opt_notify_changes_only;
470 break;
471 case 'c':
472 options.api_call = optarg;
473 break;
474 case 'a':
475 options.action = optarg;
476 break;
477 case 'r':
478 options.rsc_id = optarg;
479 break;
480 case 'x':
481 options.cancel_call_id = atoi(optarg);
482 break;
483 case 'P':
484 options.provider = optarg;

Callers

nothing calls this directly

Calls 12

crm_set_optionsFunction · 0.85
crm_get_optionFunction · 0.85
crm_helpFunction · 0.85
lrmd_key_value_addFunction · 0.85
crm_log_initFunction · 0.85
test_exitFunction · 0.85
generate_paramsFunction · 0.85
lrmd_api_newFunction · 0.85
mainloop_add_triggerFunction · 0.85
mainloop_set_triggerFunction · 0.85
mainloop_add_signalFunction · 0.85
cib_deleteFunction · 0.85

Tested by

no test coverage detected