Parse the argument given in the command line of the application */
| 382 | |
| 383 | /* Parse the argument given in the command line of the application */ |
| 384 | static int |
| 385 | launch_args_parse(int argc, char **argv, char *prgname) |
| 386 | { |
| 387 | int opt, ret; |
| 388 | int option_index; |
| 389 | static struct option long_option[] = { |
| 390 | {CMD_LINE_OPT_PDUMP, 1, 0, CMD_LINE_OPT_PDUMP_NUM}, |
| 391 | {CMD_LINE_OPT_MULTI, 0, 0, CMD_LINE_OPT_MULTI_NUM}, |
| 392 | {NULL, 0, 0, 0} |
| 393 | }; |
| 394 | |
| 395 | if (argc == 1) |
| 396 | pdump_usage(prgname); |
| 397 | |
| 398 | /* Parse command line */ |
| 399 | while ((opt = getopt_long(argc, argv, " ", |
| 400 | long_option, &option_index)) != EOF) { |
| 401 | switch (opt) { |
| 402 | case CMD_LINE_OPT_PDUMP_NUM: |
| 403 | ret = parse_pdump(optarg); |
| 404 | if (ret) { |
| 405 | pdump_usage(prgname); |
| 406 | return -1; |
| 407 | } |
| 408 | break; |
| 409 | case CMD_LINE_OPT_MULTI_NUM: |
| 410 | multiple_core_capture = 1; |
| 411 | break; |
| 412 | default: |
| 413 | pdump_usage(prgname); |
| 414 | return -1; |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | return 0; |
| 419 | } |
| 420 | |
| 421 | static void |
| 422 | monitor_primary(void *arg __rte_unused) |
no test coverage detected