bcopy -> memcpy
This commit is contained in:
parent
0dfc6a96e1
commit
600cfcb30a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cs89x0.c,v 1.18 2001/07/18 20:42:54 thorpej Exp $ */
|
||||
/* $NetBSD: cs89x0.c,v 1.19 2001/07/18 20:52:47 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997
|
||||
|
@ -359,7 +359,7 @@ cs_attach(sc, enaddr, media, nmedia, defmedia)
|
|||
sc->sc_xe_togo = cs_xmit_early_table[sc->sc_xe_ent].better_count;
|
||||
|
||||
/* Initialize ifnet structure. */
|
||||
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
|
||||
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
|
||||
ifp->if_softc = sc;
|
||||
ifp->if_start = cs_start_output;
|
||||
ifp->if_ioctl = cs_ioctl;
|
||||
|
@ -392,7 +392,7 @@ cs_attach(sc, enaddr, media, nmedia, defmedia)
|
|||
}
|
||||
|
||||
if (enaddr != NULL)
|
||||
bcopy(enaddr, sc->sc_enaddr, sizeof(sc->sc_enaddr));
|
||||
memcpy(sc->sc_enaddr, enaddr, sizeof(sc->sc_enaddr));
|
||||
else if ((sc->sc_cfgflags & CFGFLG_NOT_EEPROM) == 0) {
|
||||
/* Get and store the Ethernet address */
|
||||
if (cs_get_enaddr(sc) == CS_ERROR) {
|
||||
|
@ -1809,7 +1809,7 @@ cs_process_rx_dma(sc)
|
|||
* No wrap around. Copy the frame
|
||||
* header
|
||||
*/
|
||||
bcopy(dma_mem_ptr, pBuff, pkt_length);
|
||||
memcpy(pBuff, dma_mem_ptr, pkt_length);
|
||||
dma_mem_ptr += pkt_length;
|
||||
} else {
|
||||
to_copy = (u_int)
|
||||
|
@ -1817,7 +1817,7 @@ cs_process_rx_dma(sc)
|
|||
dma_mem_ptr);
|
||||
|
||||
/* Copy the first half of the frame. */
|
||||
bcopy(dma_mem_ptr, pBuff, to_copy);
|
||||
memcpy(pBuff, dma_mem_ptr, to_copy);
|
||||
pBuff += to_copy;
|
||||
|
||||
/*
|
||||
|
@ -1834,7 +1834,7 @@ cs_process_rx_dma(sc)
|
|||
dma_mem_ptr = sc->sc_dmabase;
|
||||
|
||||
/* Copy rest of the frame. */
|
||||
bcopy(dma_mem_ptr, pBuff, to_copy);
|
||||
memcpy(pBuff, dma_mem_ptr, to_copy);
|
||||
dma_mem_ptr += to_copy;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ega.c,v 1.5 2000/06/26 04:56:20 simonb Exp $ */
|
||||
/* $NetBSD: ega.c,v 1.6 2001/07/18 20:52:47 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999
|
||||
|
@ -910,6 +910,6 @@ ega_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);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gus.c,v 1.70 2001/01/18 20:28:19 jdolecek Exp $ */
|
||||
/* $NetBSD: gus.c,v 1.71 2001/07/18 20:52:47 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1999 The NetBSD Foundation, Inc.
|
||||
|
@ -1139,7 +1139,7 @@ gus_deinterleave(sc, buf, size)
|
|||
* copied to the staging area (But we don't need to!).
|
||||
* Copy the remainder of the original stream into place.
|
||||
*/
|
||||
bcopy(dei, &sbuf[size/2], i * sizeof(short));
|
||||
memcpy(&sbuf[size/2], dei, i * sizeof(short));
|
||||
} else {
|
||||
u_char *dei = sc->sc_deintr_buf;
|
||||
u_char *sbuf = buf;
|
||||
|
@ -1147,7 +1147,7 @@ gus_deinterleave(sc, buf, size)
|
|||
dei[i] = sbuf[i*2+1];
|
||||
sbuf[i+1] = sbuf[i*2+2];
|
||||
}
|
||||
bcopy(dei, &sbuf[size/2], i);
|
||||
memcpy(&sbuf[size/2], dei, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ate.c,v 1.26 2001/03/31 00:30:22 jdolecek Exp $ */
|
||||
/* $NetBSD: if_ate.c,v 1.27 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
|
||||
|
@ -318,7 +318,7 @@ ate_detect(iot, ioh, enaddr)
|
|||
|
||||
/* Get our station address from EEPROM. */
|
||||
ate_read_eeprom(iot, ioh, eeprom);
|
||||
bcopy(eeprom + FE_ATI_EEP_ADDR, enaddr, ETHER_ADDR_LEN);
|
||||
memcpy(enaddr, eeprom + FE_ATI_EEP_ADDR, ETHER_ADDR_LEN);
|
||||
|
||||
/* Make sure we got a valid station address. */
|
||||
if ((enaddr[0] & 0x03) != 0x00 ||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_eg.c,v 1.53 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
/* $NetBSD: if_eg.c,v 1.54 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Dean Huxley <dean@fsa.ca>
|
||||
|
@ -448,7 +448,7 @@ egattach(parent, self, aux)
|
|||
egprintpcb(sc->eg_pcb);
|
||||
return;
|
||||
}
|
||||
bcopy(&sc->eg_pcb[2], myaddr, ETHER_ADDR_LEN);
|
||||
memcpy(myaddr, &sc->eg_pcb[2], ETHER_ADDR_LEN);
|
||||
|
||||
printf("%s: ROM v%d.%02d %dk address %s\n", self->dv_xname,
|
||||
sc->eg_rom_major, sc->eg_rom_minor, sc->eg_ram,
|
||||
|
@ -474,7 +474,7 @@ egattach(parent, self, aux)
|
|||
}
|
||||
|
||||
/* Initialize ifnet structure. */
|
||||
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
|
||||
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
|
||||
ifp->if_softc = sc;
|
||||
ifp->if_start = egstart;
|
||||
ifp->if_ioctl = egioctl;
|
||||
|
@ -636,7 +636,7 @@ loop:
|
|||
|
||||
buffer = sc->eg_outbuf;
|
||||
for (m = m0; m != 0; m = m->m_next) {
|
||||
bcopy(mtod(m, caddr_t), buffer, m->m_len);
|
||||
memcpy(buffer, mtod(m, caddr_t), m->m_len);
|
||||
buffer += m->m_len;
|
||||
}
|
||||
|
||||
|
@ -709,9 +709,9 @@ egintr(arg)
|
|||
case EG_RSP_GETSTATS:
|
||||
DPRINTF(("%s: Card Statistics\n",
|
||||
sc->sc_dev.dv_xname));
|
||||
bcopy(&sc->eg_pcb[2], &i, sizeof(i));
|
||||
memcpy(&i, &sc->eg_pcb[2], sizeof(i));
|
||||
DPRINTF(("Receive Packets %d\n", i));
|
||||
bcopy(&sc->eg_pcb[6], &i, sizeof(i));
|
||||
memcpy(&i, &sc->eg_pcb[6], sizeof(i));
|
||||
DPRINTF(("Transmit Packets %d\n", i));
|
||||
DPRINTF(("CRC errors %d\n",
|
||||
*(short *) &sc->eg_pcb[10]));
|
||||
|
@ -810,7 +810,7 @@ egget(sc, buf, totlen)
|
|||
}
|
||||
|
||||
m->m_len = len = min(totlen, len);
|
||||
bcopy((caddr_t)buf, mtod(m, caddr_t), len);
|
||||
memcpy(mtod(m, caddr_t), (caddr_t)buf, len);
|
||||
buf += len;
|
||||
|
||||
totlen -= len;
|
||||
|
@ -863,7 +863,7 @@ egioctl(ifp, cmd, data)
|
|||
ina->x_host =
|
||||
*(union ns_host *)LLADDR(ifp->if_sadl);
|
||||
else
|
||||
bcopy(ina->x_host.c_host, LLADDR(ifp->if_sadl),
|
||||
memcpy(LLADDR(ifp->if_sadl), ina->x_host.c_host,
|
||||
ETHER_ADDR_LEN);
|
||||
/* Set new address. */
|
||||
eginit(sc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_el.c,v 1.63 2000/12/14 06:59:57 thorpej Exp $ */
|
||||
/* $NetBSD: if_el.c,v 1.64 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, Matthew E. Kimmel. Permission is hereby granted
|
||||
|
@ -227,7 +227,7 @@ elattach(parent, self, aux)
|
|||
elstop(sc);
|
||||
|
||||
/* Initialize ifnet structure. */
|
||||
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
|
||||
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
|
||||
ifp->if_softc = sc;
|
||||
ifp->if_start = elstart;
|
||||
ifp->if_ioctl = elioctl;
|
||||
|
@ -698,7 +698,7 @@ elioctl(ifp, cmd, data)
|
|||
ina->x_host =
|
||||
*(union ns_host *)LLADDR(ifp->if_sadl);
|
||||
else
|
||||
bcopy(ina->x_host.c_host, LLADDR(ifp->if_sadl),
|
||||
memcpy(LLADDR(ifp->if_sadl), ina->x_host.c_host,
|
||||
ETHER_ADDR_LEN);
|
||||
/* Set new address. */
|
||||
elinit(sc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_hp.c,v 1.31 2001/07/18 20:42:54 thorpej Exp $ */
|
||||
/* $NetBSD: if_hp.c,v 1.32 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
/* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */
|
||||
|
||||
|
@ -923,7 +923,7 @@ hpget(buf, totlen, off0, ifp)
|
|||
} else
|
||||
len = m->m_len;
|
||||
}
|
||||
bcopy(cp, mtod(m, caddr_t), (unsigned) len);
|
||||
memcpy(mtod(m, caddr_t), cp, (unsigned) len);
|
||||
cp += len;
|
||||
*mp = m;
|
||||
mp = &m->m_next;
|
||||
|
@ -975,8 +975,9 @@ hpioctl(ifp, cmd, data)
|
|||
* so reset everything
|
||||
*/
|
||||
ifp->if_flags &= ~IFF_RUNNING;
|
||||
bcopy((caddr_t) ina->x_host.c_host,
|
||||
(caddr_t) ns->ns_addrp, sizeof(ns->ns_addrp));
|
||||
memcpy((caddr_t) ns->ns_addrp,
|
||||
(caddr_t) ina->x_host.c_host,
|
||||
sizeof(ns->ns_addrp));
|
||||
}
|
||||
hpinit(ifp->if_unit); /* does hp_setaddr() */
|
||||
break;
|
||||
|
@ -1006,7 +1007,7 @@ hpioctl(ifp, cmd, data)
|
|||
|
||||
#ifdef notdef
|
||||
case SIOCGHWADDR:
|
||||
bcopy((caddr_t) ns->ns_addrp, (caddr_t) & ifr->ifr_data,
|
||||
memcpy((caddr_t) & ifr->ifr_data, (caddr_t) ns->ns_addrp,
|
||||
sizeof(ns->ns_addrp));
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_iy.c,v 1.54 2001/07/18 20:42:54 thorpej Exp $ */
|
||||
/* $NetBSD: if_iy.c,v 1.55 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
/* #define IYDEBUG */
|
||||
/* #define IYMEMDEBUG */
|
||||
|
||||
|
@ -315,7 +315,7 @@ iyattach(parent, self, aux)
|
|||
|
||||
iyprobemem(sc);
|
||||
|
||||
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
|
||||
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
|
||||
ifp->if_softc = sc;
|
||||
ifp->if_start = iystart;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS
|
||||
|
@ -1218,7 +1218,7 @@ iyioctl(ifp, cmd, data)
|
|||
ina->x_host = *(union ns_host *)
|
||||
LLADDR(ifp->if_sadl);
|
||||
else
|
||||
bcopy(ina->x_host.c_host, LLADDR(ifp->if_sadl),
|
||||
memcpy(LLADDR(ifp->if_sadl), ina->x_host.c_host,
|
||||
ETHER_ADDR_LEN);
|
||||
/* Set new address. */
|
||||
iyinit(sc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: satlink.c,v 1.12 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
/* $NetBSD: satlink.c,v 1.13 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -375,7 +375,7 @@ satlinkioctl(dev, cmd, data, flags, p)
|
|||
break;
|
||||
|
||||
case SATIOGID:
|
||||
bcopy(&sc->sc_id, data, sizeof(sc->sc_id));
|
||||
memcpy(data, &sc->sc_id, sizeof(sc->sc_id));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wds.c,v 1.43 2001/07/18 20:39:53 thorpej Exp $ */
|
||||
/* $NetBSD: wds.c,v 1.44 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
|
@ -1157,7 +1157,7 @@ wds_scsipi_request(chan, req, arg)
|
|||
|
||||
/* Zero out the command structure. */
|
||||
memset(&scb->cmd, 0, sizeof scb->cmd);
|
||||
bcopy(xs->cmd, &scb->cmd.scb,
|
||||
memcpy(&scb->cmd.scb, xs->cmd,
|
||||
xs->cmdlen < 12 ? xs->cmdlen : 12);
|
||||
|
||||
/* Set up some of the command fields. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wt.c,v 1.51 2000/07/06 02:02:50 thorpej Exp $ */
|
||||
/* $NetBSD: wt.c,v 1.52 2001/07/18 20:52:48 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Streamer tape driver.
|
||||
|
@ -248,7 +248,7 @@ wtattach(parent, self, aux)
|
|||
/* Try Wangtek. */
|
||||
if (wtreset(iot, ioh, &wtregs)) {
|
||||
sc->type = WANGTEK;
|
||||
bcopy(&wtregs, &sc->regs, sizeof(sc->regs));
|
||||
memcpy(&sc->regs, &wtregs, sizeof(sc->regs));
|
||||
printf(": type <Wangtek>\n");
|
||||
goto ok;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ wtattach(parent, self, aux)
|
|||
/* Try Archive. */
|
||||
if (wtreset(iot, ioh, &avregs)) {
|
||||
sc->type = ARCHIVE;
|
||||
bcopy(&avregs, &sc->regs, sizeof(sc->regs));
|
||||
memcpy(&sc->regs, &avregs, sizeof(sc->regs));
|
||||
printf(": type <Archive>\n");
|
||||
/* Reset DMA. */
|
||||
bus_space_write_1(iot, ioh, sc->regs.RDMAPORT, 0);
|
||||
|
@ -717,7 +717,7 @@ wtintr(arg)
|
|||
/* If reading short block, copy the internal buffer
|
||||
* to the user memory. */
|
||||
isa_dmadone(sc->sc_ic, sc->chan);
|
||||
bcopy(sc->buf, sc->dmavaddr, sc->dmatotal - sc->dmacount);
|
||||
memcpy(sc->dmavaddr, sc->buf, sc->dmatotal - sc->dmacount);
|
||||
} else
|
||||
isa_dmadone(sc->sc_ic, sc->chan);
|
||||
|
||||
|
|
Loading…
Reference in New Issue