diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 90bee3c87f5b..f6177fbd0b8e 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.95 1998/04/20 21:53:07 julian Exp $ + * $Id: autoconf.c,v 1.96 1998/05/06 22:14:40 julian Exp $ */ /* @@ -398,7 +398,6 @@ setdumpdev(dev) { int maj, psize; long newdumplo; - struct partinfo pi; if (dev == NODEV) { dumpdev = dev; @@ -419,9 +418,7 @@ setdumpdev(dev) * and nuke dodump sysctl (too many knobs), and move this to * kern_shutdown.c... */ - if (bdevsw[maj]->d_ioctl(dev, DIOCGPART, (caddr_t)&pi, 0, NULL) != 0) - return (ENODEV); - if (pi.part->p_fstype != FS_SWAP) + if (dkpart(dev) != SWAP_PART) return (ENODEV); newdumplo = psize - Maxmem * PAGE_SIZE / DEV_BSIZE; if (newdumplo < 0) diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 90bee3c87f5b..f6177fbd0b8e 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.95 1998/04/20 21:53:07 julian Exp $ + * $Id: autoconf.c,v 1.96 1998/05/06 22:14:40 julian Exp $ */ /* @@ -398,7 +398,6 @@ setdumpdev(dev) { int maj, psize; long newdumplo; - struct partinfo pi; if (dev == NODEV) { dumpdev = dev; @@ -419,9 +418,7 @@ setdumpdev(dev) * and nuke dodump sysctl (too many knobs), and move this to * kern_shutdown.c... */ - if (bdevsw[maj]->d_ioctl(dev, DIOCGPART, (caddr_t)&pi, 0, NULL) != 0) - return (ENODEV); - if (pi.part->p_fstype != FS_SWAP) + if (dkpart(dev) != SWAP_PART) return (ENODEV); newdumplo = psize - Maxmem * PAGE_SIZE / DEV_BSIZE; if (newdumplo < 0) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 40704d8821ba..448bcc0b5ec8 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 - * $Id: kern_shutdown.c,v 1.29 1998/03/08 09:56:54 julian Exp $ + * $Id: kern_shutdown.c,v 1.30 1998/05/06 22:14:48 julian Exp $ */ #include "opt_ddb.h" @@ -55,7 +55,6 @@ #include #include #include -#include #include #include @@ -359,21 +358,17 @@ SYSINIT(dump_conf, SI_SUB_DUMP_CONF, SI_ORDER_FIRST, dump_conf, NULL) static void dumpsys(void) { - struct partinfo pi; if (!dodump) return; if (dumpdev == NODEV) return; + if ((minor(dumpdev)&07) != 1) + return; if (!(bdevsw[major(dumpdev)])) return; if (!(bdevsw[major(dumpdev)]->d_dump)) return; - if ((*bdevsw[major(dumpdev)]->d_ioctl)(dumpdev, DIOCGPART, - (caddr_t)&pi, 0, NULL)) - return; - if (pi.part->p_fstype != FS_SWAP) - return; dumpsize = Maxmem; printf("\ndumping to dev %lx, offset %ld\n", dumpdev, dumplo); printf("dump ");