diff options
author | grr <grr@cvs.openbsd.org> | 1997-05-30 08:27:56 +0000 |
---|---|---|
committer | grr <grr@cvs.openbsd.org> | 1997-05-30 08:27:56 +0000 |
commit | 6abc5caa1ffa78d437a4d96ad1b928ed3800fd62 (patch) | |
tree | 71d00a6aef281fad324b88eb33a9a782133c2c02 /sys | |
parent | 07fbbda60285bfceba0444d25d0098a61aabd2d7 (diff) |
Inhbit the silly "Insert fileystem floppy" message when booting from floppy
and root isn't really going to be mounted on the floppy, i.e. ramdisk...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/dev/fd.c | 23 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 7 |
2 files changed, 21 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index ca8c1fde423..c703e19e963 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.16 1997/05/11 22:37:34 grr Exp $ */ +/* $OpenBSD: fd.c,v 1.17 1997/05/30 08:27:49 grr Exp $ */ /* $NetBSD: fd.c,v 1.33.4.1 1996/06/12 20:52:25 pk Exp $ */ /*- @@ -1692,6 +1692,12 @@ fd_do_eject() auxregbisc(AUXIO_FEJ, AUXIO_FDS); } +/* + * The mountroot_hook is called once the root and swap device have been + * established. NULL implies that we may have been the boot device but + * haven't been elected for the root device. + */ + /* ARGSUSED */ void fd_mountroot_hook(dev) @@ -1700,12 +1706,15 @@ fd_mountroot_hook(dev) int c; fd_do_eject(); - printf("Insert filesystem floppy and press return."); - for (;;) { - c = cngetc(); - if ((c == '\r') || (c == '\n')) { - printf("\n"); - return; + + if (dev) { + printf("Insert filesystem floppy and press return."); + for (;;) { + c = cngetc(); + if ((c == '\r') || (c == '\n')) { + printf("\n"); + return; + } } } } diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index 6b8cb20832c..e6b7a359b21 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1908,7 +1908,7 @@ setroot() #endif bp = nbootpath == 0 ? NULL : &bootpath[nbootpath-1]; - bootdv = bp == NULL ? NULL : bp->dev; + bootdv = (bp == NULL) ? NULL : bp->dev; /* * If `swap generic' and we couldn't determine boot device, @@ -2079,7 +2079,10 @@ gotroot: for (mrhp = mrh_list.lh_first; mrhp != NULL; mrhp = mrhp->mr_link.le_next) if (mrhp->mr_device == bootdv) { - (*mrhp->mr_func)(bootdv); + if (findblkmajor(mrhp->mr_device) == major(rootdev)) + (*mrhp->mr_func)(bootdv); + else + (*mrhp->mr_func)(NULL); break; } |