Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci bcopy -> memcpy, strcpy
details: https://anonhg.NetBSD.org/src/rev/8cf2d8018de8
branches: trunk
changeset: 512202:8cf2d8018de8
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Jul 07 16:40:23 2001 +0000
description:
bcopy -> memcpy, strcpy
diffstat:
sys/dev/pci/if_de.c | 33 ++++++++++++++++-----------------
sys/dev/pci/if_ti.c | 6 +++---
sys/dev/pci/if_tl.c | 12 +++++++-----
sys/dev/pci/if_vr.c | 6 +++---
4 files changed, 29 insertions(+), 28 deletions(-)
diffs (212 lines):
diff -r cecb7055c463 -r 8cf2d8018de8 sys/dev/pci/if_de.c
--- a/sys/dev/pci/if_de.c Sat Jul 07 16:39:16 2001 +0000
+++ b/sys/dev/pci/if_de.c Sat Jul 07 16:40:23 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_de.c,v 1.99 2001/06/13 10:46:04 wiz Exp $ */
+/* $NetBSD: if_de.c,v 1.100 2001/07/07 16:40:23 thorpej Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt%3am-software.com@localhost)
@@ -272,9 +272,9 @@
/*
* Construct a LLC TEST message which will point to ourselves.
*/
- bcopy(sc->tulip_enaddr, mtod(m, struct ether_header *)->ether_dhost,
+ memcpy(mtod(m, struct ether_header *)->ether_dhost, sc->tulip_enaddr,
ETHER_ADDR_LEN);
- bcopy(sc->tulip_enaddr, mtod(m, struct ether_header *)->ether_shost,
+ memcpy(mtod(m, struct ether_header *)->ether_shost, sc->tulip_enaddr,
ETHER_ADDR_LEN);
mtod(m, struct ether_header *)->ether_type = htons(3);
mtod(m, unsigned char *)[14] = 0;
@@ -2164,7 +2164,7 @@
return;
if (bcmp(sc->tulip_rombuf + 29, "DE500", 5) == 0
|| bcmp(sc->tulip_rombuf + 29, "DE450", 5) == 0) {
- bcopy(sc->tulip_rombuf + 29, &sc->tulip_boardid[D0], 8);
+ memcpy(&sc->tulip_boardid[D0], sc->tulip_rombuf + 29, 8);
sc->tulip_boardid[D0+8] = ' ';
}
#undef D0
@@ -2501,7 +2501,7 @@
/*
* Save the hardware address.
*/
- bcopy((caddr_t) shp->sh_ieee802_address, (caddr_t) sc->tulip_enaddr,
+ memcpy((caddr_t) sc->tulip_enaddr, (caddr_t) shp->sh_ieee802_address,
ETHER_ADDR_LEN);
/*
* If this is a multiple port card, add the adapter index to the last
@@ -2967,7 +2967,7 @@
if (sc->tulip_rombuf[0] == 0 && sc->tulip_rombuf[1] == 0
&& sc->tulip_rombuf[2] == 0)
return -4;
- bcopy(sc->tulip_rombuf, sc->tulip_enaddr, ETHER_ADDR_LEN);
+ memcpy(sc->tulip_enaddr, sc->tulip_rombuf, ETHER_ADDR_LEN);
sc->tulip_features |= TULIP_HAVE_OKROM;
goto check_oui;
} else {
@@ -3001,12 +3001,12 @@
sc->tulip_boardsw = root_sc->tulip_boardsw;
strcpy(sc->tulip_boardid, root_sc->tulip_boardid);
if (sc->tulip_boardsw->bd_type == TULIP_21140_ISV) {
- bcopy(root_sc->tulip_rombuf, sc->tulip_rombuf,
+ memcpy(sc->tulip_rombuf, root_sc->tulip_rombuf,
sizeof(sc->tulip_rombuf));
if (!tulip_srom_decode(sc))
return -5;
} else {
- bcopy(root_sc->tulip_enaddr, sc->tulip_enaddr,
+ memcpy(sc->tulip_enaddr, root_sc->tulip_enaddr,
ETHER_ADDR_LEN);
sc->tulip_enaddr[5] += sc->tulip_unit - root_sc->tulip_unit;
}
@@ -3041,7 +3041,7 @@
if (bcmp(&sc->tulip_rombuf[0], tmpbuf, 8) != 0)
return -2;
- bcopy(sc->tulip_rombuf, sc->tulip_enaddr, ETHER_ADDR_LEN);
+ memcpy(sc->tulip_enaddr, sc->tulip_rombuf, ETHER_ADDR_LEN);
cksum = *(u_int16_t *) &sc->tulip_enaddr[0];
cksum *= 2;
@@ -4670,7 +4670,7 @@
sc->tulip_if.if_start = tulip_ifstart;
return;
}
- bcopy(sc->tulip_setupdata, sc->tulip_setupbuf,
+ memcpy(sc->tulip_setupbuf, sc->tulip_setupdata,
sizeof(sc->tulip_setupbuf));
/*
* Clear WANTSETUP and set DOINGSETUP. Set know that WANTSETUP is
@@ -4776,9 +4776,9 @@
ina->x_host = *(union ns_host *)(sc->tulip_enaddr);
} else {
ifp->if_flags &= ~IFF_RUNNING;
- bcopy((caddr_t)ina->x_host.c_host,
- (caddr_t)sc->tulip_enaddr,
- sizeof(sc->tulip_enaddr));
+ memcpy((caddr_t)sc->tulip_enaddr,
+ (caddr_t)ina->x_host.c_host,
+ sizeof(sc->tulip_enaddr));
}
tulip_init(sc);
break;
@@ -4793,9 +4793,8 @@
break;
}
case SIOCGIFADDR: {
- bcopy((caddr_t) sc->tulip_enaddr,
- (caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
- ETHER_ADDR_LEN);
+ memcpy((caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
+ (caddr_t) sc->tulip_enaddr, ETHER_ADDR_LEN);
break;
}
@@ -5758,7 +5757,7 @@
#endif
#if defined(__NetBSD__)
- bcopy(self->dv_xname, sc->tulip_if.if_xname, IFNAMSIZ);
+ strcpy(sc->tulip_if.if_xname, self->dv_xname);
sc->tulip_if.if_softc = sc;
sc->tulip_pc = pa->pa_pc;
#if defined(TULIP_BUS_DMA)
diff -r cecb7055c463 -r 8cf2d8018de8 sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c Sat Jul 07 16:39:16 2001 +0000
+++ b/sys/dev/pci/if_ti.c Sat Jul 07 16:40:23 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.37 2001/07/05 21:27:31 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.38 2001/07/07 16:40:24 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1851,7 +1851,7 @@
/* Set up ifnet structure */
ifp = &sc->ethercom.ec_if;
ifp->if_softc = sc;
- bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
+ strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_ioctl = ti_ioctl;
ifp->if_start = ti_start;
@@ -2791,7 +2791,7 @@
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,
ifp->if_addrlen);
break;
}
diff -r cecb7055c463 -r 8cf2d8018de8 sys/dev/pci/if_tl.c
--- a/sys/dev/pci/if_tl.c Sat Jul 07 16:39:16 2001 +0000
+++ b/sys/dev/pci/if_tl.c Sat Jul 07 16:40:23 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tl.c,v 1.40 2001/06/21 16:33:33 bouyer Exp $ */
+/* $NetBSD: if_tl.c,v 1.41 2001/07/07 16:40:24 thorpej Exp $ */
/* XXX ALTQ XXX */
@@ -437,7 +437,7 @@
} else
ifmedia_set(&sc->tl_mii.mii_media, IFM_ETHER|IFM_AUTO);
- bcopy(sc->sc_dev.dv_xname, sc->tl_if.if_xname, IFNAMSIZ);
+ strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
sc->tl_if.if_softc = sc;
ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_NOTRAILERS|IFF_MULTICAST;
ifp->if_ioctl = tl_ifioctl;
@@ -1124,7 +1124,7 @@
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,
ifp->if_addrlen);
break;
}
@@ -1483,11 +1483,13 @@
#ifdef TLDEBUG
printf("tl_ticks: sending LLC test pkt\n");
#endif
- bcopy(sc->tl_enaddr,
+ memcpy(
mtod(m, struct ether_header *)->ether_dhost,
+ sc->tl_enaddr,
6);
- bcopy(sc->tl_enaddr,
+ memcpy(
mtod(m, struct ether_header *)->ether_shost,
+ sc->tl_enaddr,
6);
mtod(m, struct ether_header *)->ether_type =
htons(3);
diff -r cecb7055c463 -r 8cf2d8018de8 sys/dev/pci/if_vr.c
--- a/sys/dev/pci/if_vr.c Sat Jul 07 16:39:16 2001 +0000
+++ b/sys/dev/pci/if_vr.c Sat Jul 07 16:40:23 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vr.c,v 1.48 2001/06/12 22:28:16 thorpej Exp $ */
+/* $NetBSD: if_vr.c,v 1.49 2001/07/07 16:40:24 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -1520,7 +1520,7 @@
printf("%s: Ethernet address: %s\n",
sc->vr_dev.dv_xname, ether_sprintf(eaddr));
- bcopy(eaddr, sc->vr_enaddr, ETHER_ADDR_LEN);
+ memcpy(sc->vr_enaddr, eaddr, ETHER_ADDR_LEN);
sc->vr_dmat = pa->pa_dmat;
@@ -1599,7 +1599,7 @@
ifp->if_stop = vr_stop;
IFQ_SET_READY(&ifp->if_snd);
- bcopy(sc->vr_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
+ strcpy(ifp->if_xname, sc->vr_dev.dv_xname);
/*
* Initialize MII/media info.
Home |
Main Index |
Thread Index |
Old Index