diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2004-12-18 03:05:25 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2004-12-18 03:05:25 +0000 |
commit | faf0b82756c37d8ba6e7918b45e93ed20b1d20cc (patch) | |
tree | 3e5b83a8eab2fb21099197d4f78c6f2b5348979b /sys/arch/sparc64/dev | |
parent | 2a260d4c1d82b7e7020a744e517df08fd6dfec0d (diff) |
Print error codes in panic message.
From NetBSD
ok miod@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r-- | sys/arch/sparc64/dev/psycho.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index 651fdeed070..bde842df157 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.38 2003/12/20 20:08:17 miod Exp $ */ +/* $OpenBSD: psycho.c,v 1.39 2004/12/18 03:05:24 brad Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -657,10 +657,11 @@ psycho_get_bus_range(node, brp) int node; int *brp; { - int n; + int n, error; - if (getprop(node, "bus-range", sizeof(*brp), &n, (void **)&brp)) - panic("could not get psycho bus-range"); + error = getprop(node, "bus-range", sizeof(*brp), &n, (void **)&brp); + if (error) + panic("could not get psycho bus-range, error %d", error); if (n != 2) panic("broken psycho bus-range"); DPRINTF(PDB_PROM, |