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/mvmeppc | |
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/mvmeppc')
-rw-r--r-- | sys/arch/mvmeppc/mvmeppc/autoconf.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/arch/mvmeppc/mvmeppc/autoconf.c b/sys/arch/mvmeppc/mvmeppc/autoconf.c index f894373b15c..fafb7a88d12 100644 --- a/sys/arch/mvmeppc/mvmeppc/autoconf.c +++ b/sys/arch/mvmeppc/mvmeppc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.16 2007/05/04 19:30:55 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.17 2007/05/29 20:36:48 deraadt Exp $ */ /* * Copyright (c) 1996, 1997 Per Fogelstrom * Copyright (c) 1995 Theo de Raadt @@ -37,7 +37,7 @@ * from: Utah Hdr: autoconf.c 1.31 91/01/21 * * from: @(#)autoconf.c 8.1 (Berkeley) 6/10/93 - * $Id: autoconf.c,v 1.16 2007/05/04 19:30:55 deraadt Exp $ + * $Id: autoconf.c,v 1.17 2007/05/29 20:36:48 deraadt Exp $ */ /* @@ -126,19 +126,13 @@ long dumplo = -1; /* blocks */ */ #if 0 void -dumpconf() +dumpconf(void) { int nblks; /* size of dump area */ - int maj; - if (dumpdev == NODEV) + if (dumpdev == NODEV || + (nblks = (bdevsw[major(dumpdev)].d_psize)(dumpdev)) == 0) return; - maj = major(dumpdev); - if (maj < 0 || maj >= nblkdev) - panic("dumpconf: bad dumpdev=0x%x", dumpdev); - if (bdevsw[maj].d_psize == NULL) - return; - nblks = (*bdevsw[maj].d_psize)(dumpdev); if (nblks <= ctod(1)) return; |