diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 2437fcb445d4..7a34f82b714c 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.43 1995/11/28 03:15:53 peter Exp $ + * $Id: autoconf.c,v 1.44 1995/12/03 17:51:36 bde Exp $ */ /* @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -343,3 +344,20 @@ setroot() mindev >> (majdev == FDMAJOR ? FDUNITSHIFT : PARTITIONSHIFT), part + 'a'); } + +static int +sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS +{ + int error; + dev_t ndumpdev; + + ndumpdev = dumpdev; + error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req); + if (!error && ndumpdev != dumpdev) { + error = setdumpdev(ndumpdev); + } + return (error); +} + +SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW, + 0, sizeof dumpdev, sysctl_kern_dumpdev, "I", ""); diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 2437fcb445d4..7a34f82b714c 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.43 1995/11/28 03:15:53 peter Exp $ + * $Id: autoconf.c,v 1.44 1995/12/03 17:51:36 bde Exp $ */ /* @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -343,3 +344,20 @@ setroot() mindev >> (majdev == FDMAJOR ? FDUNITSHIFT : PARTITIONSHIFT), part + 'a'); } + +static int +sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS +{ + int error; + dev_t ndumpdev; + + ndumpdev = dumpdev; + error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req); + if (!error && ndumpdev != dumpdev) { + error = setdumpdev(ndumpdev); + } + return (error); +} + +SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW, + 0, sizeof dumpdev, sysctl_kern_dumpdev, "I", ""); diff --git a/sys/i386/i386/swapgeneric.c b/sys/i386/i386/swapgeneric.c index 0b44893e76a2..105a17c7bb16 100644 --- a/sys/i386/i386/swapgeneric.c +++ b/sys/i386/i386/swapgeneric.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)swapgeneric.c 5.5 (Berkeley) 5/9/91 - * $Id: swapgeneric.c,v 1.13 1995/10/31 17:03:26 joerg Exp $ + * $Id: swapgeneric.c,v 1.14 1995/12/04 16:47:43 phk Exp $ */ #include @@ -44,7 +44,6 @@ #include #include #include -#include #include #include @@ -66,24 +65,6 @@ dev_t rootdev = NODEV; dev_t dumpdev = NODEV; -static int -sysctl_kern_dumpdev SYSCTL_HANDLER_ARGS -{ - int error; - dev_t ndumpdev; - - ndumpdev = dumpdev; - error = sysctl_handle_opaque(oidp, &ndumpdev, sizeof ndumpdev, req); - if (!error && ndumpdev != dumpdev) { - error = setdumpdev(ndumpdev); - } - return (error); -} - -SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW, - 0, sizeof dumpdev, sysctl_kern_dumpdev, ""); - - #ifdef notused int nswap; struct swdevt swdevt[] = {