diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-25 18:44:42 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-25 18:44:42 +0000 |
commit | df6b615a42c3a228698fa7ee83e75a4cea0fa07c (patch) | |
tree | 60f2197c16240797e90dd2d6b097ee1e6e8243eb | |
parent | ce225127b95d998124b088fea29df053acd25430 (diff) | |
download | src-df6b615a42c3a228698fa7ee83e75a4cea0fa07c.tar.gz src-df6b615a42c3a228698fa7ee83e75a4cea0fa07c.zip |
#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.
Notes
Notes:
svn path=/head/; revision=105948
-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 5166ab4c518c..2d6e66012b8f 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; |