| 425 | } |
| 426 | |
| 427 | int |
| 428 | main(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; |
nothing calls this directly
no test coverage detected