diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-05-29 20:36:49 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-05-29 20:36:49 +0000 |
commit | 872493b3d04d0610e955d5256f8e65565f16136e (patch) | |
tree | ca0588a08483e9a36a08ab241369ed1a6abd4760 /sys/arch/hp300 | |
parent | 4b2a151dba5d4d95104e374323f36ed02f52034f (diff) |
start of dumpconf() unification, which one day we can pray will be MI
(and part of setroot); ok miod
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 5726190a6d1..0feb6c02e46 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.113 2007/05/27 17:31:56 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.114 2007/05/29 20:36:47 deraadt Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -717,19 +717,13 @@ cpu_kcore_hdr_t cpu_kcore_hdr; * reduce the chance that swapping trashes it. */ void -dumpconf() +dumpconf(void) { int nblks; /* size of dump area */ - int maj; - if (dumpdev == NODEV) - return; - maj = major(dumpdev); - if (maj < 0 || maj >= nblkdev) - panic("dumpconf: bad dumpdev=0x%x", dumpdev); - if (bdevsw[maj].d_psize == NULL) + if (dumpdev == NODEV || + (nblks = (bdevsw[major(dumpdev)].d_psize)(dumpdev)) == 0) return; - nblks = (*bdevsw[maj].d_psize)(dumpdev); if (nblks <= ctod(1)) return; |