summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-07-30 20:30:49 +0000
committerbde <bde@FreeBSD.org>1996-07-30 20:30:49 +0000
commit7aa24eec62cddb81db2f595ef7c1fdc6d468feab (patch)
tree24f1e935f135e75c934b58171b977d9186a35249 /sys
parent7886abfb1f51cc9064aef060d181040ce7d74dfc (diff)
downloadFreeBSD-src-7aa24eec62cddb81db2f595ef7c1fdc6d468feab.zip
FreeBSD-src-7aa24eec62cddb81db2f595ef7c1fdc6d468feab.tar.gz
Fixed longstanding bug of not checking `dumpdev' or setting `dumplo'
early enough when the dump device is specified in the config file. Removed stale comment about configuration root and swap devices. Don't bother clearing dumplo when dumpdev is set to NODEV. Everything is controlled by dumpdev. Fixed the kern.dumpdev sysctl. Writes were handle bogusly.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/autoconf.c17
-rw-r--r--sys/i386/i386/autoconf.c17
2 files changed, 14 insertions, 20 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c
index b91fd8b..3905ec3 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.54 1996/06/02 18:58:39 joerg Exp $
+ * $Id: autoconf.c,v 1.55 1996/06/08 09:37:35 bde Exp $
*/
/*
@@ -191,6 +191,9 @@ configure(dummy)
isa_configure();
#endif
+ if (setdumpdev(dumpdev) != 0)
+ dumpdev = NODEV;
+
configure_finish();
cninit_finish();
@@ -268,15 +271,11 @@ configure(dummy)
setroot();
}
#endif
+
if (!mountroot) {
panic("Nobody wants to mount my root for me");
}
- /*
- * Configure swap area and related system
- * parameter based on device(s) used.
- */
- if (bootverbose)
- printf("Configuring root and swap devs.\n");
+
setconf();
cold = 0;
if (bootverbose)
@@ -292,7 +291,6 @@ setdumpdev(dev)
if (dev == NODEV) {
dumpdev = dev;
- dumplo = 0;
return (0);
}
maj = major(dev);
@@ -379,9 +377,8 @@ sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS
ndumpdev = dumpdev;
error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req);
- if (!error && ndumpdev != dumpdev) {
+ if (error == 0 && req->newptr != NULL)
error = setdumpdev(ndumpdev);
- }
return (error);
}
diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c
index b91fd8b..3905ec3 100644
--- a/sys/i386/i386/autoconf.c
+++ b/sys/i386/i386/autoconf.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
- * $Id: autoconf.c,v 1.54 1996/06/02 18:58:39 joerg Exp $
+ * $Id: autoconf.c,v 1.55 1996/06/08 09:37:35 bde Exp $
*/
/*
@@ -191,6 +191,9 @@ configure(dummy)
isa_configure();
#endif
+ if (setdumpdev(dumpdev) != 0)
+ dumpdev = NODEV;
+
configure_finish();
cninit_finish();
@@ -268,15 +271,11 @@ configure(dummy)
setroot();
}
#endif
+
if (!mountroot) {
panic("Nobody wants to mount my root for me");
}
- /*
- * Configure swap area and related system
- * parameter based on device(s) used.
- */
- if (bootverbose)
- printf("Configuring root and swap devs.\n");
+
setconf();
cold = 0;
if (bootverbose)
@@ -292,7 +291,6 @@ setdumpdev(dev)
if (dev == NODEV) {
dumpdev = dev;
- dumplo = 0;
return (0);
}
maj = major(dev);
@@ -379,9 +377,8 @@ sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS
ndumpdev = dumpdev;
error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req);
- if (!error && ndumpdev != dumpdev) {
+ if (error == 0 && req->newptr != NULL)
error = setdumpdev(ndumpdev);
- }
return (error);
}
OpenPOWER on IntegriCloud