MCPcopy Create free account
hub / github.com/F-Stack/f-stack / parse_directive

Function parse_directive

freebsd/kern/vfs_mountroot.c:691–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691static int
692parse_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
719static int
720parse_mount_dev_present(const char *dev)

Callers 1

vfs_mountroot_parseFunction · 0.85

Calls 9

parse_tokenFunction · 0.85
strcmpFunction · 0.85
parse_dir_askFunction · 0.85
parse_dir_mdFunction · 0.85
parse_dir_onfailFunction · 0.85
parse_dir_timeoutFunction · 0.85
parse_skiptoFunction · 0.85
printfFunction · 0.70
freeFunction · 0.70

Tested by

no test coverage detected