diff options
author | phk <phk@FreeBSD.org> | 2002-10-25 18:44:42 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-25 18:44:42 +0000 |
commit | 097ab10d4b4a20934c15fc4601f7fa455d4ea97f (patch) | |
tree | 60f2197c16240797e90dd2d6b097ee1e6e8243eb /sys/kern/vfs_mount.c | |
parent | 1f3b3d6f9d4201251eafa29865faffe014587516 (diff) | |
download | FreeBSD-src-097ab10d4b4a20934c15fc4601f7fa455d4ea97f.zip FreeBSD-src-097ab10d4b4a20934c15fc4601f7fa455d4ea97f.tar.gz |
#include <geom/geom.h> to get proper prototypes. Contrary to my fears we
seem to have all the prerequisites already.
Call g_waitidle() as the first thing in vfs_mountroot() so that we have
it out of the way before we even decide if we should call .._ask() or
.._try().
Call the g_dev_print() function to provide better guidance for the
root-mount prompt.
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r-- | sys/kern/vfs_mount.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 5166ab4..2d6e660 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -83,6 +83,8 @@ #include <sys/systm.h> #include <sys/vnode.h> +#include <geom/geom.h> + #include <machine/stdarg.h> #include "opt_rootdevname.h" @@ -1394,7 +1396,9 @@ vfs_mountroot(void) { char *cp; int i, error; - + + g_waitidle(); + /* * The root filesystem information is compiled in, and we are * booted with instructions to use it. @@ -1465,8 +1469,6 @@ vfs_mountroot(void) panic("Root mount failed, startup aborted."); } -void g_waitidle(void); - /* * Mount (mountfrom) as the root filesystem. */ @@ -1485,8 +1487,6 @@ vfs_mountroot_try(char *mountfrom) mp = NULL; error = EINVAL; - g_waitidle(); - if (mountfrom == NULL) return(error); /* don't complain */ @@ -1587,11 +1587,13 @@ vfs_mountroot_ask(void) if (name[0] == 0) return(1); if (name[0] == '?') { - printf("Possibly valid devices for 'ufs' root:\n"); - for (i = 0; i < NUMCDEVSW; i++) { - dev = makedev(i, 0); - if (devsw(dev) != NULL) - printf(" \"%s\"", devsw(dev)->d_name); + if (!g_dev_print()) { + printf("Possibly valid devices for 'ufs' root:\n"); + for (i = 0; i < NUMCDEVSW; i++) { + dev = makedev(i, 0); + if (devsw(dev) != NULL) + printf(" \"%s\"", devsw(dev)->d_name); + } } printf("\n"); continue; |