| 32 | /* *INDENT-ON* */ |
| 33 | |
| 34 | int |
| 35 | main(int argc, char **argv) |
| 36 | { |
| 37 | int rc = 0; |
| 38 | int lpc = 0; |
| 39 | int flag = 0; |
| 40 | int option_index = 0; |
| 41 | |
| 42 | crm_log_cli_init("crm_error"); |
| 43 | crm_set_options(NULL, "[options] -- rc", long_options, |
| 44 | "Tool for displaying the textual description of a reported error code"); |
| 45 | |
| 46 | while (flag >= 0) { |
| 47 | flag = crm_get_option(argc, argv, &option_index); |
| 48 | switch (flag) { |
| 49 | case -1: |
| 50 | break; |
| 51 | case 'V': |
| 52 | crm_bump_log_level(argc, argv); |
| 53 | break; |
| 54 | case '$': |
| 55 | case '?': |
| 56 | crm_help(flag, EX_OK); |
| 57 | break; |
| 58 | default: |
| 59 | crm_help(flag, EX_OK); |
| 60 | break; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | for(lpc = optind; lpc < argc; lpc++) { |
| 65 | rc = crm_atoi(argv[lpc], NULL); |
| 66 | printf("%s\n", pcmk_strerror(rc)); |
| 67 | } |
| 68 | return 0; |
| 69 | } |
nothing calls this directly
no test coverage detected