diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-03-14 03:48:57 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-03-14 03:48:57 +0000 |
commit | 875c52ae56d2f0a893b71d75fc187c982883d77c (patch) | |
tree | c0520b6544cdd17424e24f3cb28cd5d042b739a3 /sys | |
parent | 0e553ee338a24217fdd2b9709812501b4acb8485 (diff) |
use getprop, not getpropstring to fetch 'magma_prom' property...
ra->ra_name is needed and is the result of getpropstring
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/dev/magma.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c index cd8319692de..9a1ffefdb3c 100644 --- a/sys/arch/sparc/dev/magma.c +++ b/sys/arch/sparc/dev/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.10 2002/01/25 02:37:43 jason Exp $ */ +/* $OpenBSD: magma.c,v 1.11 2002/03/14 03:48:56 jason Exp $ */ /* * magma.c * @@ -362,11 +362,17 @@ struct confargs *ca = args; struct romaux *ra = &ca->ca_ra; struct magma_softc *sc = (struct magma_softc *)dev; struct magma_board_info *card; -char *magma_prom, *clockstr; -int chip, cd_clock; +char magma_prom[40], *clockstr; +int chip, cd_clock, len; void *base; - magma_prom = getpropstring(ra->ra_node, "magma_prom"); + + len = getprop(ra->ra_node, "magma_prom", + magma_prom, sizeof(magma_prom) - 1); + if (len == -1) + len = 0; + magma_prom[len] = '\0'; + for (card = supported_cards; card->mb_name != NULL; card++) { if (strcmp(ra->ra_name, card->mb_sbusname) != 0) continue; |