| 689 | } |
| 690 | |
| 691 | static int |
| 692 | parse_directive(char **conf) |
| 693 | { |
| 694 | char *dir; |
| 695 | int error; |
| 696 | |
| 697 | error = parse_token(conf, &dir); |
| 698 | if (error) |
| 699 | return (error); |
| 700 | |
| 701 | if (strcmp(dir, ".ask") == 0) |
| 702 | error = parse_dir_ask(conf); |
| 703 | else if (strcmp(dir, ".md") == 0) |
| 704 | error = parse_dir_md(conf); |
| 705 | else if (strcmp(dir, ".onfail") == 0) |
| 706 | error = parse_dir_onfail(conf); |
| 707 | else if (strcmp(dir, ".timeout") == 0) |
| 708 | error = parse_dir_timeout(conf); |
| 709 | else { |
| 710 | printf("mountroot: invalid directive `%s'\n", dir); |
| 711 | /* Ignore the rest of the line. */ |
| 712 | (void)parse_skipto(conf, '\n'); |
| 713 | error = EINVAL; |
| 714 | } |
| 715 | free(dir, M_TEMP); |
| 716 | return (error); |
| 717 | } |
| 718 | |
| 719 | static int |
| 720 | parse_mount_dev_present(const char *dev) |
no test coverage detected