diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-10 14:02:50 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-10 14:02:50 +0000 |
commit | 2c3e03f90915f6ab02edcbd4a3f4237d4395bbf3 (patch) | |
tree | 3bf312fa5beedbab4e371497c9551f6a604954ed | |
parent | f110d60e06f3c4fc93737be8c7da4c0aa3ea85a4 (diff) |
Make this compile with gcc4. Cleanup some debug code while I'm there.
-rw-r--r-- | sys/arch/sparc64/sparc64/openfirm.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/arch/sparc64/sparc64/openfirm.c b/sys/arch/sparc64/sparc64/openfirm.c index 863a0c42918..1ae1392b110 100644 --- a/sys/arch/sparc64/sparc64/openfirm.c +++ b/sys/arch/sparc64/sparc64/openfirm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openfirm.c,v 1.13 2007/02/11 20:29:22 miod Exp $ */ +/* $OpenBSD: openfirm.c,v 1.14 2010/04/10 14:02:49 kettenis Exp $ */ /* $NetBSD: openfirm.c,v 1.13 2001/06/21 00:08:02 eeh Exp $ */ /* @@ -505,7 +505,7 @@ OF_read(handle, addr, len) args.nreturns = 1; args.ihandle = HDL2CELL(handle); args.addr = ADR2CELL(addr); - for (; len > 0; len -= l, (char *)addr += l) { + for (; len > 0; len -= l) { l = min(NBPG, len); args.len = l; if (openfirmware(&args) == -1) @@ -541,20 +541,16 @@ OF_write(handle, addr, len) cell_t actual; } args; int l, act = 0; - + + if (len > 1024) { + panic("OF_write(len=%d)", len); + } args.name = ADR2CELL("write"); args.nargs = 3; args.nreturns = 1; args.ihandle = HDL2CELL(handle); args.addr = ADR2CELL(addr); -if (len>1024) { prom_printf("OF_write() > 1024\n"); -#ifdef DDB -Debugger(); -#else -panic("OF_write"); -#endif -} - for (; len > 0; len -= l, (char *)addr += l) { + for (; len > 0; len -= l) { l = min(NBPG, len); args.len = l; if (openfirmware(&args) == -1) |