summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-05-28 14:58:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-05-28 14:58:15 +0000
commit1d60868897439fe3fe666da0b753c72274b53331 (patch)
tree032ba68be1a8fe19a80b09b2442d7946c98cf867 /sys
parent71ef8e368aefa2cd3cdfdbf99eedc242b679aa2c (diff)
do not print "root on ..." twice for the -a case, also cope with systems
configured for 'root on nfs'
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/autoconf.c12
-rw-r--r--sys/arch/i386/i386/autoconf.c12
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/arch/amd64/amd64/autoconf.c b/sys/arch/amd64/amd64/autoconf.c
index ca036375dd3..29fd3925c2f 100644
--- a/sys/arch/amd64/amd64/autoconf.c
+++ b/sys/arch/amd64/amd64/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.13 2006/05/20 22:40:32 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.14 2006/05/28 14:58:14 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -265,7 +265,6 @@ setroot()
struct ifnet *ifp;
mountroot = nfs_mountroot;
- nfsbootdevname = NULL; /* we do not know */
printf("PXE boot MAC address %s, ",
ether_sprintf(bios_bootmac->mac));
@@ -439,8 +438,6 @@ rootconf()
gc->gc_driver->cd_devs[unit] == NULL) {
printf("%d: no such unit\n", unit);
} else {
- printf("root on %s%d%c\n", gc->gc_name, unit,
- 'a' + part);
rootdev = makedev(gc->gc_major,
unit * MAXPARTITIONS + part);
mountroot = dk_mountroot;
@@ -481,8 +478,12 @@ rootconf()
if (mountroot == NULL) {
/* `swap generic' */
setroot();
+#if defined(NFSCLIENT)
+ } else if (mountroot == nfs_mountroot) {
+ ;
+#endif
} else {
- /* preconfigured */
+ /* preconfigured on disk */
int majdev, unit, part;
majdev = major(rootdev);
@@ -491,7 +492,6 @@ rootconf()
part = minor(rootdev) % MAXPARTITIONS;
unit = minor(rootdev) / MAXPARTITIONS;
printf("root on %s%d%c\n", findblkname(majdev), unit, part + 'a');
- mountroot = dk_mountroot;
}
if (mountroot == dk_mountroot)
swdevt[0].sw_dev = argdev = dumpdev =
diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c
index f64fac9698f..a8000829ae1 100644
--- a/sys/arch/i386/i386/autoconf.c
+++ b/sys/arch/i386/i386/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.61 2006/05/20 22:40:30 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.62 2006/05/28 14:58:12 deraadt Exp $ */
/* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */
/*-
@@ -256,7 +256,6 @@ setroot()
struct ifnet *ifp;
mountroot = nfs_mountroot;
- nfsbootdevname = NULL; /* we do not know */
printf("PXE boot MAC address %s, ",
ether_sprintf(bios_bootmac->mac));
@@ -431,8 +430,6 @@ rootconf()
gc->gc_driver->cd_devs[unit] == NULL) {
printf("%d: no such unit\n", unit);
} else {
- printf("root on %s%d%c\n", gc->gc_name, unit,
- 'a' + part);
rootdev = makedev(gc->gc_major,
unit * MAXPARTITIONS + part);
mountroot = dk_mountroot;
@@ -473,8 +470,12 @@ rootconf()
if (mountroot == NULL) {
/* `swap generic' */
setroot();
+#if defined(NFSCLIENT)
+ } else if (mountroot == nfs_mountroot) {
+ ;
+#endif
} else {
- /* preconfigured */
+ /* preconfigured for disk */
int majdev, unit, part;
majdev = major(rootdev);
@@ -483,7 +484,6 @@ rootconf()
part = minor(rootdev) % MAXPARTITIONS;
unit = minor(rootdev) / MAXPARTITIONS;
printf("root on %s%d%c\n", findblkname(majdev), unit, part + 'a');
- mountroot = dk_mountroot;
}
if (mountroot == dk_mountroot)
swdevt[0].sw_dev = argdev = dumpdev =