summaryrefslogtreecommitdiff
path: root/sys/arch/mac68k
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-29 20:36:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-05-29 20:36:49 +0000
commit872493b3d04d0610e955d5256f8e65565f16136e (patch)
treeca0588a08483e9a36a08ab241369ed1a6abd4760 /sys/arch/mac68k
parent4b2a151dba5d4d95104e374323f36ed02f52034f (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/mac68k')
-rw-r--r--sys/arch/mac68k/mac68k/machdep.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/arch/mac68k/mac68k/machdep.c b/sys/arch/mac68k/mac68k/machdep.c
index 894a958c419..5c9ddc062cb 100644
--- a/sys/arch/mac68k/mac68k/machdep.c
+++ b/sys/arch/mac68k/mac68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.139 2007/05/27 17:31:56 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.140 2007/05/29 20:36:47 deraadt Exp $ */
/* $NetBSD: machdep.c,v 1.207 1998/07/08 04:39:34 thorpej Exp $ */
/*
@@ -691,21 +691,15 @@ long dumplo = 0; /* blocks */
* that swapping trashes it.
*/
void
-dumpconf()
+dumpconf(void)
{
cpu_kcore_hdr_t *h = &cpu_kcore_hdr;
int nblks; /* size of dump area */
- int maj;
int i;
- 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;