#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.
This commit is contained in:
Poul-Henning Kamp 2002-10-25 18:44:42 +00:00
parent ce225127b9
commit df6b615a42
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=105948

View File

@ -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;