bcopy -> memcpy

This commit is contained in:
thorpej 2001-07-07 15:53:13 +00:00
parent f9d2eac504
commit 7711ad565b
23 changed files with 85 additions and 85 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: adw.c,v 1.30 2001/04/30 02:55:08 lukem Exp $ */
/* $NetBSD: adw.c,v 1.31 2001/07/07 15:53:13 thorpej Exp $ */
/*
* Generic driver for the Advanced Systems Inc. SCSI controllers
@ -654,10 +654,10 @@ adw_build_req(ADW_SOFTC *sc, ADW_CCB *ccb)
* For wide boards a CDB length maximum of 16 bytes
* is supported.
*/
bcopy(xs->cmd, &scsiqp->cdb, ((scsiqp->cdb_len = xs->cmdlen) <= 12)?
memcpy(&scsiqp->cdb, xs->cmd, ((scsiqp->cdb_len = xs->cmdlen) <= 12)?
xs->cmdlen : 12 );
if(xs->cmdlen > 12)
bcopy(&(xs->cmd[12]), &scsiqp->cdb16, xs->cmdlen - 12);
memcpy(&scsiqp->cdb16, &(xs->cmd[12]), xs->cmdlen - 12);
scsiqp->target_id = periph->periph_target;
scsiqp->target_lun = periph->periph_lun;

View File

@ -1,4 +1,4 @@
/* $NetBSD: aha.c,v 1.32 2001/05/02 10:31:41 bouyer Exp $ */
/* $NetBSD: aha.c,v 1.33 2001/07/07 15:53:14 thorpej Exp $ */
#include "opt_ddb.h"
@ -1191,7 +1191,7 @@ aha_scsipi_request(chan, req, arg)
/* can't use S/G if zero length */
ccb->opcode = (xs->datalen ? AHA_INIT_SCAT_GATH_CCB
: AHA_INITIATOR_CCB);
bcopy(xs->cmd, &ccb->scsi_cmd,
memcpy(&ccb->scsi_cmd, xs->cmd,
ccb->scsi_cmd_length = xs->cmdlen);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic6360.c,v 1.72 2001/04/30 03:45:35 lukem Exp $ */
/* $NetBSD: aic6360.c,v 1.73 2001/07/07 15:53:14 thorpej Exp $ */
#include "opt_ddb.h"
#ifdef DDB
@ -554,7 +554,7 @@ aic_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
acb->scsipi_cmd_length = 0;
acb->data_length = 0;
} else {
bcopy(xs->cmd, &acb->scsipi_cmd, xs->cmdlen);
memcpy(&acb->scsipi_cmd, xs->cmd, xs->cmdlen);
acb->scsipi_cmd_length = xs->cmdlen;
acb->data_addr = xs->data;
acb->data_length = xs->datalen;

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic7xxx.c,v 1.75 2001/07/04 20:34:03 wiz Exp $ */
/* $NetBSD: aic7xxx.c,v 1.76 2001/07/07 15:53:15 thorpej Exp $ */
/*
* Generic driver for the aic7xxx based adaptec SCSI controllers
@ -1563,7 +1563,7 @@ ahc_alloc_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel)
* until an initiator talks to us.
*/
if (master_tstate != NULL) {
bcopy(master_tstate, tstate, sizeof(*tstate));
memcpy(tstate, master_tstate, sizeof(*tstate));
tstate->ultraenb = 0;
for (i = 0; i < 16; i++) {
bzero(&tstate->transinfo[i].current,
@ -3382,8 +3382,9 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
* csio.
*/
bzero(&xs->sense.scsi_sense, sizeof(xs->sense.scsi_sense));
bcopy(&ahc->scb_data->sense[scb->hscb->tag],
&xs->sense.scsi_sense, le32toh(scb->sg_list->len));
memcpy(&xs->sense.scsi_sense,
&ahc->scb_data->sense[scb->hscb->tag],
le32toh(scb->sg_list->len));
xs->error = XS_SENSE;
}
if (scb->flags & SCB_FREEZE_QUEUE) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: am7990.c,v 1.62 2001/05/30 11:46:33 mrg Exp $ */
/* $NetBSD: am7990.c,v 1.63 2001/07/07 15:53:16 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -186,7 +186,7 @@ am7990_meminit(sc)
* Update our private copy of the Ethernet address.
* We NEED the copy so we can ensure its alignment!
*/
bcopy(LLADDR(ifp->if_sadl), sc->sc_enaddr, ETHER_ADDR_LEN);
memcpy(sc->sc_enaddr, LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
myaddr = sc->sc_enaddr;
init.init_padr[0] = (myaddr[1] << 8) | myaddr[0];

View File

@ -1,4 +1,4 @@
/* $NetBSD: am79900.c,v 1.9 2001/05/30 11:46:33 mrg Exp $ */
/* $NetBSD: am79900.c,v 1.10 2001/07/07 15:53:16 thorpej Exp $ */
/*-
* Copyright (c) 1998
@ -155,7 +155,7 @@ am79900_meminit(sc)
* Update our private copy of the Ethernet address.
* We NEED the copy so we can ensure its alignment!
*/
bcopy(LLADDR(ifp->if_sadl), sc->sc_enaddr, ETHER_ADDR_LEN);
memcpy(sc->sc_enaddr, LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
myaddr = sc->sc_enaddr;
init.init_padr[0] = myaddr[0] | (myaddr[1] << 8)

View File

@ -1,4 +1,4 @@
/* $NetBSD: an.c,v 1.18 2001/07/07 05:35:39 thorpej Exp $ */
/* $NetBSD: an.c,v 1.19 2001/07/07 15:53:17 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@ -1873,7 +1873,7 @@ void an_cache_store (sc, eh, m, rx_quality)
if (saanp) {
sc->an_sigcache[cache_slot].ipsrc = ip->ip_src.s_addr;
}
bcopy(eh->ether_shost, sc->an_sigcache[cache_slot].macsrc, 6);
memcpy(sc->an_sigcache[cache_slot].macsrc, eh->ether_shost, 6);
sc->an_sigcache[cache_slot].signal = rx_quality;

View File

@ -1,4 +1,4 @@
/* $NetBSD: bha.c,v 1.43 2001/05/03 20:34:54 ross Exp $ */
/* $NetBSD: bha.c,v 1.44 2001/07/07 15:53:17 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
@ -332,7 +332,7 @@ bha_scsipi_request(chan, req, arg)
/* can't use S/G if zero length */
ccb->opcode = (xs->datalen ? BHA_INIT_SCAT_GATH_CCB
: BHA_INITIATOR_CCB);
bcopy(xs->cmd, &ccb->scsi_cmd,
memcpy(&ccb->scsi_cmd, xs->cmd,
ccb->scsi_cmd_length = xs->cmdlen);
}

View File

@ -659,7 +659,7 @@ daic_register_port(struct daic *sc, int port)
/* attach a new unit */
if (unit_map) {
struct daic_unit_map *temp = malloc(next_unit*sizeof(struct daic_unit_map), 0, M_DEVBUF);
bcopy(unit_map, temp, unit*sizeof(struct daic_unit_map));
memcpy(temp, unit_map, unit*sizeof(struct daic_unit_map));
free(unit_map, M_DEVBUF);
unit_map = temp;
} else {

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd64570.c,v 1.17 2001/06/14 05:44:26 itojun Exp $ */
/* $NetBSD: hd64570.c,v 1.18 2001/07/07 15:53:18 thorpej Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@ -1121,7 +1121,7 @@ X
("TX: about to mbuf len %d\n", m->m_len));
if (sc->sc_usedma)
bcopy(mtod(m, u_int8_t *), buf, m->m_len);
memcpy(buf, mtod(m, u_int8_t *), m->m_len);
else
bus_space_write_region_1(sc->scu_memt,
sc->scu_memh, sca_page_addr(sc, buf_p),
@ -2035,7 +2035,7 @@ sca_mbuf_alloc(struct sca_softc *sc, caddr_t p, u_int len)
if (p != NULL) {
/* XXX do we need to sync here? */
if (sc->sc_usedma)
bcopy(p, mtod(m, caddr_t), len);
memcpy(mtod(m, caddr_t), p, len);
else
bus_space_read_region_1(sc->scu_memt, sc->scu_memh,
sca_page_addr(sc, p), mtod(m, u_int8_t *), len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: isp_netbsd.h,v 1.43 2001/05/25 21:45:55 mjacob Exp $ */
/* $NetBSD: isp_netbsd.h,v 1.44 2001/07/07 15:53:18 thorpej Exp $ */
/*
* This driver, which is contained in NetBSD in the files:
*
@ -126,7 +126,7 @@ struct isposinfo {
#define ISP2100_SCRLEN 0x400
#define MEMZERO bzero
#define MEMCPY(dst, src, amt) bcopy((src), (dst), (amt))
#define MEMCPY(dst, src, amt) memcpy((dst), (src), (amt))
#define SNPRINTF snprintf
#define STRNCAT strncat
#define USEC_DELAY DELAY
@ -237,7 +237,7 @@ struct isposinfo {
if (xs->error == XS_NOERROR) { \
xs->error = XS_SENSE; \
} \
bcopy(sp->req_sense_data, &(xs)->sense, \
memcpy(&(xs)->sense, sp->req_sense_data, \
imin(XS_SNSLEN(xs), sp->req_sense_len))
#define XS_SET_STATE_STAT(a, b, c)
@ -262,7 +262,7 @@ struct isposinfo {
#define ISP_UNSWIZZLE_RESPONSE(a, b, c)
#define ISP_SWIZZLE_ICB(a, b)
#define ISP_UNSWIZZLE_AND_COPY_PDBP(isp, dest, src) \
if((void *)src != (void *)dest) bcopy(src, dest, sizeof (isp_pdb_t))
if((void *)src != (void *)dest) memcpy(dest, src, sizeof (isp_pdb_t))
#define ISP_SWIZZLE_SNS_REQ(a, b)
#define ISP_UNSWIZZLE_SNS_RSP(a, b, c)
#define ISP_SWIZZLE_NVRAM_WORD(isp, rp)

View File

@ -1,4 +1,4 @@
/* $NetBSD: mb89352.c,v 1.6 2001/04/25 17:53:33 bouyer Exp $ */
/* $NetBSD: mb89352.c,v 1.7 2001/07/07 15:53:19 thorpej Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
#ifdef DDB
@ -496,7 +496,7 @@ spc_scsipi_request(chan, req, arg)
acb->scsipi_cmd_length = 0;
acb->data_length = 0;
} else {
bcopy(xs->cmd, &acb->scsipi_cmd, xs->cmdlen);
memcpy(&acb->scsipi_cmd, xs->cmd, xs->cmdlen);
#if 1
acb->scsipi_cmd.bytes[0] |= periph->periph_lun << 5; /* XXX? */
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr53c9x.c,v 1.80 2001/05/23 18:32:26 petrov Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.81 2001/07/07 15:53:19 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -856,7 +856,7 @@ ncr53c9x_scsipi_request(chan, req, arg)
ecb->clen = 0;
ecb->dleft = 0;
} else {
bcopy(xs->cmd, &ecb->cmd.cmd, xs->cmdlen);
memcpy(&ecb->cmd.cmd, xs->cmd, xs->cmdlen);
ecb->clen = xs->cmdlen;
ecb->daddr = xs->data;
ecb->dleft = xs->datalen;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ne2000.c,v 1.34 2001/07/07 05:35:41 thorpej Exp $ */
/* $NetBSD: ne2000.c,v 1.35 2001/07/07 15:53:20 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -275,7 +275,7 @@ ne2000_attach(nsc, myea)
romdata[i * (useword ? 2 : 1)];
}
} else
bcopy(myea, dsc->sc_enaddr, sizeof(dsc->sc_enaddr));
memcpy(dsc->sc_enaddr, myea, sizeof(dsc->sc_enaddr));
/* Clear any pending interrupts that might have occurred above. */
NIC_BARRIER(nict, nich);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcdisplay_subr.c,v 1.17 2001/07/05 16:45:23 thorpej Exp $ */
/* $NetBSD: pcdisplay_subr.c,v 1.18 2001/07/07 15:53:20 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -187,7 +187,7 @@ pcdisplay_copycols(id, row, srccol, dstcol, ncols)
memh, scr->dispoffset + dstoff * 2,
ncols);
else
bcopy(&scr->mem[srcoff], &scr->mem[dstoff], ncols * 2);
memcpy(&scr->mem[dstoff], &scr->mem[srcoff], ncols * 2);
}
void
@ -235,7 +235,7 @@ pcdisplay_copyrows(id, srcrow, dstrow, nrows)
memh, scr->dispoffset + dstoff * 2,
nrows * ncols);
else
bcopy(&scr->mem[srcoff], &scr->mem[dstoff],
memcpy(&scr->mem[dstoff], &scr->mem[srcoff],
nrows * ncols * 2);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc.c,v 1.11 2001/06/17 16:15:41 jdolecek Exp $ */
/* $NetBSD: pckbc.c,v 1.12 2001/07/07 15:53:21 thorpej Exp $ */
/*
* Copyright (c) 1998
@ -641,7 +641,7 @@ pckbc_poll_cmd(self, slot, cmd, len, responselen, respbuf, slow)
return (EINVAL);
bzero(&nc, sizeof(nc));
bcopy(cmd, nc.cmd, len);
memcpy(nc.cmd, cmd, len);
nc.cmdlen = len;
nc.responselen = responselen;
nc.flags = (slow ? KBC_CMDFLAG_SLOW : 0);
@ -649,7 +649,7 @@ pckbc_poll_cmd(self, slot, cmd, len, responselen, respbuf, slow)
pckbc_poll_cmd1(t, slot, &nc);
if (nc.status == 0 && respbuf)
bcopy(nc.response, respbuf, responselen);
memcpy(respbuf, nc.response, responselen);
return (nc.status);
}
@ -833,7 +833,7 @@ pckbc_enqueue_cmd(self, slot, cmd, len, responselen, sync, respbuf)
return (ENOMEM);
bzero(nc, sizeof(*nc));
bcopy(cmd, nc->cmd, len);
memcpy(nc->cmd, cmd, len);
nc->cmdlen = len;
nc->responselen = responselen;
nc->flags = (sync ? KBC_CMDFLAG_SYNC : 0);
@ -867,7 +867,7 @@ pckbc_enqueue_cmd(self, slot, cmd, len, responselen, sync, respbuf)
if (sync) {
if (respbuf)
bcopy(nc->response, respbuf, responselen);
memcpy(respbuf, nc->response, responselen);
TAILQ_INSERT_TAIL(&q->freequeue, nc, next);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pdq_ifsubr.c,v 1.34 2001/07/07 05:35:41 thorpej Exp $ */
/* $NetBSD: pdq_ifsubr.c,v 1.35 2001/07/07 15:53:21 thorpej Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
@ -450,9 +450,9 @@ pdq_ifioctl(
ina->x_host = *(union ns_host *)PDQ_LANADDR(sc);
} else {
ifp->if_flags &= ~IFF_RUNNING;
bcopy((caddr_t)ina->x_host.c_host,
(caddr_t)PDQ_LANADDR(sc),
PDQ_LANADDR_SIZE(sc));
memcpy((caddr_t)PDQ_LANADDR(sc),
(caddr_t)ina->x_host.c_host,
PDQ_LANADDR_SIZE(sc));
}
pdq_ifinit(sc);
@ -469,9 +469,8 @@ pdq_ifioctl(
}
case SIOCGIFADDR: {
struct ifreq *ifr = (struct ifreq *)data;
bcopy((caddr_t) PDQ_LANADDR(sc),
(caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
6);
memcpy((caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
(caddr_t) PDQ_LANADDR(sc), 6);
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sgec.c,v 1.14 2001/07/07 05:35:41 thorpej Exp $ */
/* $NetBSD: sgec.c,v 1.15 2001/07/07 15:53:21 thorpej Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
*
@ -617,7 +617,7 @@ ze_setup(sc)
* Init the setup packet with valid info.
*/
memset(zc->zc_setup, 0xff, sizeof(zc->zc_setup)); /* Broadcast */
bcopy(enaddr, zc->zc_setup, ETHER_ADDR_LEN);
memcpy(zc->zc_setup, enaddr, ETHER_ADDR_LEN);
/*
* Multicast handling. The SGEC can handle up to 16 direct
@ -631,7 +631,7 @@ ze_setup(sc)
ifp->if_flags |= IFF_ALLMULTI;
break;
}
bcopy(enm->enm_addrlo, &zc->zc_setup[j], ETHER_ADDR_LEN);
memcpy(&zc->zc_setup[j], enm->enm_addrlo, ETHER_ADDR_LEN);
j += 8;
ETHER_NEXT_MULTI(step, enm);
if ((enm != NULL)&& (j == 128)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: uha.c,v 1.26 2001/04/25 17:53:34 bouyer Exp $ */
/* $NetBSD: uha.c,v 1.27 2001/07/07 15:53:21 thorpej Exp $ */
#undef UHADEBUG
#ifdef DDB
@ -471,7 +471,7 @@ uha_scsipi_request(chan, req, arg)
mscp->opcode = UHA_TSP;
/* XXX Not for tapes. */
mscp->ca = 0x01;
bcopy(xs->cmd, &mscp->scsi_cmd, mscp->scsi_cmd_length);
memcpy(&mscp->scsi_cmd, xs->cmd, mscp->scsi_cmd_length);
}
mscp->xdir = UHA_SDET;
mscp->dcn = 0x00;

View File

@ -1,4 +1,4 @@
/* $NetBSD: vga.c,v 1.35 2001/01/18 20:28:17 jdolecek Exp $ */
/* $NetBSD: vga.c,v 1.36 2001/07/07 15:53:22 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -987,7 +987,7 @@ vga_copyrows(id, srcrow, dstrow, nrows)
nrows * ncols);
}
} else
bcopy(&scr->pcs.mem[srcoff], &scr->pcs.mem[dstoff],
memcpy(&scr->pcs.mem[dstoff], &scr->pcs.mem[srcoff],
nrows * ncols * 2);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wi.c,v 1.19 2001/07/07 05:35:42 thorpej Exp $ */
/* $NetBSD: wi.c,v 1.20 2001/07/07 15:53:22 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -334,12 +334,12 @@ static void wi_rxeof(sc)
m->m_pkthdr.len = m->m_len =
le16toh(rx_frame.wi_dat_len) + WI_SNAPHDR_LEN;
bcopy((char *)&rx_frame.wi_dst_addr,
(char *)&eh->ether_dhost, ETHER_ADDR_LEN);
bcopy((char *)&rx_frame.wi_src_addr,
(char *)&eh->ether_shost, ETHER_ADDR_LEN);
bcopy((char *)&rx_frame.wi_type,
(char *)&eh->ether_type, sizeof(u_int16_t));
memcpy((char *)&eh->ether_dhost, (char *)&rx_frame.wi_dst_addr,
ETHER_ADDR_LEN);
memcpy((char *)&eh->ether_shost, (char *)&rx_frame.wi_src_addr,
ETHER_ADDR_LEN);
memcpy((char *)&eh->ether_type, (char *)&rx_frame.wi_type,
sizeof(u_int16_t));
if (wi_read_data(sc, id, WI_802_11_OFFSET,
mtod(m, caddr_t) + sizeof(struct ether_header),
@ -948,8 +948,8 @@ allmulti:
i >= 16)
goto allmulti;
bcopy(enm->enm_addrlo,
(char *)&mcast.wi_mcast[i], ETHER_ADDR_LEN);
memcpy((char *)&mcast.wi_mcast[i], enm->enm_addrlo,
ETHER_ADDR_LEN);
i++;
ETHER_NEXT_MULTI(estep, enm);
}
@ -974,9 +974,9 @@ wi_setdef(sc, wreq)
switch(wreq->wi_type) {
case WI_RID_MAC_NODE:
sdl = (struct sockaddr_dl *)ifp->if_sadl;
bcopy((char *)&wreq->wi_val, (char *)&sc->sc_macaddr,
memcpy((char *)&sc->sc_macaddr, (char *)&wreq->wi_val,
ETHER_ADDR_LEN);
bcopy((char *)&wreq->wi_val, LLADDR(sdl), ETHER_ADDR_LEN);
memcpy(LLADDR(sdl), (char *)&wreq->wi_val, ETHER_ADDR_LEN);
break;
case WI_RID_PORTTYPE:
error = wi_sync_media(sc, le16toh(wreq->wi_val[0]), sc->wi_tx_rate);
@ -1033,7 +1033,7 @@ wi_setdef(sc, wreq)
sc->wi_tx_key = le16toh(wreq->wi_val[0]);
break;
case WI_RID_DEFLT_CRYPT_KEYS:
bcopy((char *)wreq, (char *)&sc->wi_keys,
memcpy((char *)&sc->wi_keys, (char *)wreq,
sizeof(struct wi_ltv_keys));
break;
default:
@ -1060,8 +1060,8 @@ wi_getdef(sc, wreq)
case WI_RID_MAC_NODE:
wreq->wi_len += ETHER_ADDR_LEN / 2 - 1;
sdl = (struct sockaddr_dl *)ifp->if_sadl;
bcopy(&sc->sc_macaddr, &wreq->wi_val, ETHER_ADDR_LEN);
bcopy(LLADDR(sdl), &wreq->wi_val, ETHER_ADDR_LEN);
memcpy(&wreq->wi_val, &sc->sc_macaddr, ETHER_ADDR_LEN);
memcpy(&wreq->wi_val, LLADDR(sdl), ETHER_ADDR_LEN);
break;
case WI_RID_PORTTYPE:
wreq->wi_val[0] = htole16(sc->wi_ptype);
@ -1119,7 +1119,7 @@ wi_getdef(sc, wreq)
break;
case WI_RID_DEFLT_CRYPT_KEYS:
wreq->wi_len += sizeof(struct wi_ltv_keys) / 2 - 1;
bcopy(&sc->wi_keys, wreq, sizeof(struct wi_ltv_keys));
memcpy(wreq, &sc->wi_keys, sizeof(struct wi_ltv_keys));
break;
default:
#if 0
@ -1216,7 +1216,7 @@ wi_ioctl(ifp, command, data)
break;
if (wreq.wi_type == WI_RID_IFACE_STATS) {
/* XXX native byte order */
bcopy((char *)&sc->wi_stats, (char *)&wreq.wi_val,
memcpy((char *)&wreq.wi_val, (char *)&sc->wi_stats,
sizeof(sc->wi_stats));
wreq.wi_len = (sizeof(sc->wi_stats) / 2) + 1;
} else if (wreq.wi_type == WI_RID_DEFLT_CRYPT_KEYS) {
@ -1225,7 +1225,7 @@ wi_ioctl(ifp, command, data)
bzero((char *)&wreq,
sizeof(struct wi_ltv_keys));
else
bcopy((char *)&sc->wi_keys, (char *)&wreq,
memcpy((char *)&wreq, (char *)&sc->wi_keys,
sizeof(struct wi_ltv_keys));
} else {
if (sc->sc_enabled == 0)
@ -1482,14 +1482,14 @@ wi_start(ifp)
ntohs(eh->ether_type) == ETHERTYPE_ARP ||
ntohs(eh->ether_type) == ETHERTYPE_REVARP ||
ntohs(eh->ether_type) == ETHERTYPE_IPV6) {
bcopy((char *)&eh->ether_dhost,
(char *)&tx_frame.wi_addr1, ETHER_ADDR_LEN);
bcopy((char *)&eh->ether_shost,
(char *)&tx_frame.wi_addr2, ETHER_ADDR_LEN);
bcopy((char *)&eh->ether_dhost,
(char *)&tx_frame.wi_dst_addr, ETHER_ADDR_LEN);
bcopy((char *)&eh->ether_shost,
(char *)&tx_frame.wi_src_addr, ETHER_ADDR_LEN);
memcpy((char *)&tx_frame.wi_addr1, (char *)&eh->ether_dhost,
ETHER_ADDR_LEN);
memcpy((char *)&tx_frame.wi_addr2, (char *)&eh->ether_shost,
ETHER_ADDR_LEN);
memcpy((char *)&tx_frame.wi_dst_addr, (char *)&eh->ether_dhost,
ETHER_ADDR_LEN);
memcpy((char *)&tx_frame.wi_src_addr, (char *)&eh->ether_shost,
ETHER_ADDR_LEN);
tx_frame.wi_dat_len = htole16(m0->m_pkthdr.len - WI_SNAPHDR_LEN);
tx_frame.wi_frame_ctl = htole16(WI_FTYPE_DATA);
@ -1558,7 +1558,7 @@ wi_mgmt_xmit(sc, data, len)
bzero((char *)&tx_frame, sizeof(tx_frame));
id = sc->wi_tx_mgmt_id;
bcopy((char *)hdr, (char *)&tx_frame.wi_frame_ctl,
memcpy((char *)&tx_frame.wi_frame_ctl, (char *)hdr,
sizeof(struct wi_80211_hdr));
tx_frame.wi_dat_len = htole16(len - WI_SNAPHDR_LEN);

View File

@ -1,4 +1,4 @@
/* $NetBSD: wireg.h,v 1.7 2001/06/02 15:49:17 toshii Exp $ */
/* $NetBSD: wireg.h,v 1.8 2001/07/07 15:53:22 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -328,7 +328,7 @@ struct wi_ltv_str {
s.wi_len = (l / 2) + 2; \
s.wi_type = recno; \
s.wi_str[0] = htole16(strlen(str)); \
bcopy(str, (char *)&s.wi_str[1], strlen(str)); \
memcpy((char *)&s.wi_str[1], str, strlen(str)); \
wi_write_record(sc, (struct wi_ltv_gen *)&s); \
} while (0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: z8530sc.c,v 1.14 2001/07/07 05:36:18 thorpej Exp $ */
/* $NetBSD: z8530sc.c,v 1.15 2001/07/07 15:53:22 thorpej Exp $ */
/*
* Copyright (c) 1994 Gordon W. Ross
@ -145,7 +145,7 @@ zs_loadchannelregs(cs)
return; /* only change if values are different */
/* Copy "pending" regs to "current" */
bcopy((caddr_t)cs->cs_preg, (caddr_t)cs->cs_creg, 16);
memcpy((caddr_t)cs->cs_creg, (caddr_t)cs->cs_preg, 16);
reg = cs->cs_creg; /* current regs */
/* disable interrupts */