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

Function parse_dir_ask

freebsd/kern/vfs_mountroot.c:521–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521static int
522parse_dir_ask(char **conf)
523{
524 char name[80];
525 char *mnt;
526 int error;
527
528 vfs_mountroot_wait();
529
530 printf("\nLoader variables:\n");
531 parse_dir_ask_printenv("vfs.root.mountfrom");
532 parse_dir_ask_printenv("vfs.root.mountfrom.options");
533
534 printf("\nManual root filesystem specification:\n");
535 printf(" <fstype>:<device> [options]\n");
536 printf(" Mount <device> using filesystem <fstype>\n");
537 printf(" and with the specified (optional) option list.\n");
538 printf("\n");
539 printf(" eg. ufs:/dev/da0s1a\n");
540 printf(" zfs:zroot/ROOT/default\n");
541 printf(" cd9660:/dev/cd0 ro\n");
542 printf(" (which is equivalent to: ");
543 printf("mount -t cd9660 -o ro /dev/cd0 /)\n");
544 printf("\n");
545 printf(" ? List valid disk boot devices\n");
546 printf(" . Yield 1 second (for background tasks)\n");
547 printf(" <empty line> Abort manual input\n");
548
549 do {
550 error = EINVAL;
551 printf("\nmountroot> ");
552 cngets(name, sizeof(name), GETS_ECHO);
553 if (name[0] == '\0')
554 break;
555 if (name[0] == '?' && name[1] == '\0') {
556 printf("\nList of GEOM managed disk devices:\n ");
557 g_dev_print();
558 continue;
559 }
560 if (name[0] == '.' && name[1] == '\0') {
561 pause("rmask", hz);
562 continue;
563 }
564 mnt = name;
565 error = parse_mount(&mnt);
566 if (error == -1)
567 printf("Invalid file system specification.\n");
568 } while (error != 0);
569
570 return (error);
571}
572
573static int
574parse_dir_md(char **conf)

Callers 1

parse_directiveFunction · 0.85

Calls 5

vfs_mountroot_waitFunction · 0.85
parse_dir_ask_printenvFunction · 0.85
cngetsFunction · 0.85
parse_mountFunction · 0.85
printfFunction · 0.70

Tested by

no test coverage detected