* ReadCmd() */
| 572 | * ReadCmd() |
| 573 | */ |
| 574 | static int |
| 575 | ReadCmd(int ac, char **av) |
| 576 | { |
| 577 | FILE *fp; |
| 578 | int rtn; |
| 579 | |
| 580 | /* Open file */ |
| 581 | switch (ac) { |
| 582 | case 2: |
| 583 | if ((fp = fopen(av[1], "r")) == NULL) { |
| 584 | warn("%s", av[1]); |
| 585 | return (CMDRTN_ERROR); |
| 586 | } |
| 587 | break; |
| 588 | default: |
| 589 | return (CMDRTN_USAGE); |
| 590 | } |
| 591 | |
| 592 | /* Process it */ |
| 593 | rtn = ReadFile(fp); |
| 594 | fclose(fp); |
| 595 | return (rtn); |
| 596 | } |
| 597 | |
| 598 | /* |
| 599 | * HelpCmd() |
nothing calls this directly
no test coverage detected