diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-11-16 17:00:31 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-11-16 17:00:31 +0000 |
commit | c7984c1b1bee43501fd3fcfba078267a4d5d12f8 (patch) | |
tree | 19e26a4cbbba30f93279e0be8523b59c66c09e83 | |
parent | 5b6e2382bd18ed92a5e14e350e2a9f68a0fba4ca (diff) |
make a copy of attach args for each attachment
-rw-r--r-- | sys/arch/hppa/hppa/autoconf.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/hppa/hppa/autoconf.c b/sys/arch/hppa/hppa/autoconf.c index 3b8fc37679e..0c3c27b3191 100644 --- a/sys/arch/hppa/hppa/autoconf.c +++ b/sys/arch/hppa/hppa/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.5 1999/08/14 03:17:32 mickey Exp $ */ +/* $OpenBSD: autoconf.c,v 1.6 1999/11/16 17:00:30 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -320,6 +320,7 @@ pdc_scanbus(self, ca, bus, maxmod) register int i; for (i = maxmod; i--; ) { + struct confargs nca; struct pdc_iodc_read pdc_iodc_read; dp.dp_bc[0] = dp.dp_bc[1] = dp.dp_bc[2] = dp.dp_bc[3] = -1; @@ -331,21 +332,20 @@ pdc_scanbus(self, ca, bus, maxmod) PDC_MEMMAP_HPA, &pdc_memmap, &dp) < 0) continue; + nca = *ca; if (pdc_call((iodcio_t)pdc, 0, PDC_IODC, PDC_IODC_READ, &pdc_iodc_read, pdc_memmap.hpa, IODC_DATA, - &ca->ca_type, sizeof(ca->ca_type)) < 0) + &nca.ca_type, sizeof(nca.ca_type)) < 0) continue; - ca->ca_mod = i; - ca->ca_hpa = pdc_memmap.hpa; - ca->ca_iot = 0; - ca->ca_pdc_iodc_read = &pdc_iodc_read; - ca->ca_name = hppa_mod_info(ca->ca_type.iodc_type, - ca->ca_type.iodc_sv_model); + nca.ca_mod = i; + nca.ca_hpa = pdc_memmap.hpa; + nca.ca_pdc_iodc_read = &pdc_iodc_read; + nca.ca_name = hppa_mod_info(nca.ca_type.iodc_type, + nca.ca_type.iodc_sv_model); - config_found_sm(self, ca, mbprint, mbsubmatch); + config_found_sm(self, &nca, mbprint, mbsubmatch); } - } const char * |