summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-04-15 14:52:24 +0000
committerbde <bde@FreeBSD.org>1999-04-15 14:52:24 +0000
commit2633265e241ab13d0313291561267bfc28dd3843 (patch)
treeaeb0a16c9a60d1ad5ac74ccf23138f43713c332d /sys/amd64
parent6087319c1f2e21cdaf71f0f1b250d9426ca83720 (diff)
downloadFreeBSD-src-2633265e241ab13d0313291561267bfc28dd3843.zip
FreeBSD-src-2633265e241ab13d0313291561267bfc28dd3843.tar.gz
Made booting with -a work for all configurations. Previously it
only worked for configurations with "swap on generic". usr.sbin/config/config.y: - ignore all "swap [on] device ...' specifications except for warning about them. They haven't done anything related to swap for almost 4 years, and were previously silently ignored, except for "swap on generic" which stopped swap${KERNEL}.c from being generated. Code to support swapping is now deader than before. usr.sbin/config/mkswapconf.c: - don't generate a dummy setconf() function in swap${KERNEL}.c. sys/i386/conf/files.i386: - swapgeneric.c is now standard. It should be merged into autoconf.c so that it doesn't conflict with swap${KERNEL}.c for kernels named "generic". sys/i386/i386/autoconf.c: - don't call setroot() for mfs roots. Since setroot() doesn't do anything harmful, this was just a waste of time, except possibly for booting with -a it may have helped prevent an undesireable call to setconf() by finding a bogus rootdev. - honor -a for ffs roots. -a now overrides all other ways of specifying the root device. Previously, -r had precedence over -a, and the -a handling was usually a no-op. - don't honor -a for non-ffs roots, since it would currently just get in the way of a clean panic. sys/i386/i386/swapgeneric.c: - don't declare things that are now always declared in swap${KERNEL}.c. Don't decide things that are now decided in autoconf.c. Code to support the "generic" case is now dead instead of useless.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/autoconf.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index 528e270..fc7ab85 100644
--- a/sys/amd64/amd64/autoconf.c
+++ b/sys/amd64/amd64/autoconf.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
- * $Id: autoconf.c,v 1.110 1998/10/26 07:05:34 bde Exp $
+ * $Id: autoconf.c,v 1.111 1999/01/19 00:10:59 peter Exp $
*/
/*
@@ -333,19 +333,9 @@ cpu_rootconf()
if (!mountrootfsname) {
if (bootverbose)
printf("Considering MFS root f/s.\n");
- if (mfs_getimage()) {
+ if (mfs_getimage())
mountrootfsname = "mfs";
- /*
- * Ignore the -a flag if this kernel isn't compiled
- * with a generic root/swap configuration: if we skip
- * setroot() and we aren't a generic kernel, chaos
- * will ensue because setconf() will be a no-op.
- * (rootdev is always initialized to NODEV in a
- * generic configuration, so we test for that.)
- */
- if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV)
- setroot();
- } else if (bootverbose)
+ else if (bootverbose)
printf("No MFS image available as root f/s.\n");
}
#endif
@@ -370,15 +360,9 @@ cpu_rootconf()
mountrootfsname = "ufs";
if (bootverbose)
printf("Considering FFS root f/s.\n");
- /*
- * Ignore the -a flag if this kernel isn't compiled
- * with a generic root/swap configuration: if we skip
- * setroot() and we aren't a generic kernel, chaos
- * will ensue because setconf() will be a no-op.
- * (rootdev is always initialized to NODEV in a
- * generic configuration, so we test for that.)
- */
- if ((boothowto & RB_ASKNAME) == 0 || rootdev != NODEV)
+ if (boothowto & RB_ASKNAME)
+ setconf();
+ else
setroot();
}
#endif
@@ -386,8 +370,6 @@ cpu_rootconf()
if (!mountrootfsname) {
panic("Nobody wants to mount my root for me");
}
-
- setconf();
}
OpenPOWER on IntegriCloud