Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev bcopy -> memcpy
details: https://anonhg.NetBSD.org/src/rev/0a289c9870a7
branches: trunk
changeset: 512209:0a289c9870a7
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Jul 07 17:04:01 2001 +0000
description:
bcopy -> memcpy
bzero -> memset
diffstat:
sys/dev/ccd.c | 14 +++++++-------
sys/dev/clock_subr.c | 4 ++--
sys/dev/md.c | 8 ++++----
sys/dev/rnd.c | 6 +++---
sys/dev/rndpool.c | 6 +++---
sys/dev/vnd.c | 12 ++++++------
6 files changed, 25 insertions(+), 25 deletions(-)
diffs (212 lines):
diff -r f82b801a9e39 -r 0a289c9870a7 sys/dev/ccd.c
--- a/sys/dev/ccd.c Sat Jul 07 16:51:47 2001 +0000
+++ b/sys/dev/ccd.c Sat Jul 07 17:04:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd.c,v 1.71 2001/01/08 02:03:46 fvdl Exp $ */
+/* $NetBSD: ccd.c,v 1.72 2001/07/07 17:04:01 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -195,7 +195,7 @@
return;
}
numccd = num;
- bzero(ccd_softc, num * sizeof(struct ccd_softc));
+ memset(ccd_softc, 0, num * sizeof(struct ccd_softc));
/* Initialize the component buffer pool. */
pool_init(&ccd_cbufpool, sizeof(struct ccdbuf), 0,
@@ -252,7 +252,7 @@
/*
* Copy in the pathname of the component.
*/
- bzero(tmppath, sizeof(tmppath)); /* sanity */
+ memset(tmppath, 0, sizeof(tmppath)); /* sanity */
error = copyinstr(cpaths[ix], tmppath,
MAXPATHLEN, &ci->ci_pathlen);
if (error) {
@@ -264,7 +264,7 @@
goto out;
}
ci->ci_path = malloc(ci->ci_pathlen, M_DEVBUF, M_WAITOK);
- bcopy(tmppath, ci->ci_path, ci->ci_pathlen);
+ memcpy(ci->ci_path, tmppath, ci->ci_pathlen);
path_alloced++;
/*
@@ -405,7 +405,7 @@
*/
size = (cs->sc_nccdisks + 1) * sizeof(struct ccdiinfo);
cs->sc_itable = (struct ccdiinfo *)malloc(size, M_DEVBUF, M_WAITOK);
- bzero((caddr_t)cs->sc_itable, size);
+ memset((caddr_t)cs->sc_itable, 0, size);
/*
* Trivial case: no interleave (actually interleave of disk size).
@@ -1340,7 +1340,7 @@
{
struct ccdgeom *ccg = &cs->sc_geom;
- bzero(lp, sizeof(*lp));
+ memset(lp, 0, sizeof(*lp));
lp->d_secperunit = cs->sc_size;
lp->d_secsize = ccg->ccg_secsize;
@@ -1380,7 +1380,7 @@
struct disklabel *lp = cs->sc_dkdev.dk_label;
struct cpu_disklabel *clp = cs->sc_dkdev.dk_cpulabel;
- bzero(clp, sizeof(*clp));
+ memset(clp, 0, sizeof(*clp));
ccdgetdefaultlabel(cs, lp);
diff -r f82b801a9e39 -r 0a289c9870a7 sys/dev/clock_subr.c
--- a/sys/dev/clock_subr.c Sat Jul 07 16:51:47 2001 +0000
+++ b/sys/dev/clock_subr.c Sat Jul 07 17:04:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock_subr.c,v 1.5 2000/10/03 13:41:07 tsutsui Exp $ */
+/* $NetBSD: clock_subr.c,v 1.6 2001/07/07 17:04:02 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -134,7 +134,7 @@
* so the copy can be modified (and thread-safe).
* See the definition of days_in_month() above.
*/
- bcopy(month_days, mthdays, sizeof(mthdays));
+ memcpy(mthdays, month_days, sizeof(mthdays));
#define month_days mthdays
days = secs / SECDAY;
diff -r f82b801a9e39 -r 0a289c9870a7 sys/dev/md.c
--- a/sys/dev/md.c Sat Jul 07 16:51:47 2001 +0000
+++ b/sys/dev/md.c Sat Jul 07 17:04:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.25 2001/02/08 13:11:31 tsutsui Exp $ */
+/* $NetBSD: md.c,v 1.26 2001/07/07 17:04:02 thorpej Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -130,7 +130,7 @@
printf("ramdisk: malloc for attach failed!\n");
return;
}
- bzero((caddr_t)sc, sizeof(*sc));
+ memset((caddr_t)sc, 0, sizeof(*sc));
ramdisk_devs[i] = sc;
sc->sc_dev.dv_unit = i;
sprintf(sc->sc_dev.dv_xname, "md%d", i);
@@ -364,9 +364,9 @@
xfer = (sc->sc_size - off);
addr = sc->sc_addr + off;
if (bp->b_flags & B_READ)
- bcopy(addr, bp->b_data, xfer);
+ memcpy(bp->b_data, addr, xfer);
else
- bcopy(bp->b_data, addr, xfer);
+ memcpy(addr, bp->b_data, xfer);
bp->b_resid -= xfer;
break;
diff -r f82b801a9e39 -r 0a289c9870a7 sys/dev/rnd.c
--- a/sys/dev/rnd.c Sat Jul 07 16:51:47 2001 +0000
+++ b/sys/dev/rnd.c Sat Jul 07 17:04:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rnd.c,v 1.21 2000/07/02 21:04:33 sommerfeld Exp $ */
+/* $NetBSD: rnd.c,v 1.22 2001/07/07 17:04:02 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -550,7 +550,7 @@
* will be returned, without an error.
*/
for (count = 0 ; count < rst->count && rse != NULL ; count++) {
- bcopy(&rse->data, &rst->source[count],
+ memcpy(&rst->source[count], &rse->data,
sizeof(rndsource_t));
/* Zero out information which may leak */
rst->source[count].last_time = 0;
@@ -575,7 +575,7 @@
rse = rnd_sources.lh_first;
while (rse != NULL) {
if (strncmp(rse->data.name, rstnm->name, 16) == 0) {
- bcopy(&rse->data, &rstnm->source,
+ memcpy(&rstnm->source, &rse->data,
sizeof(rndsource_t));
return 0;
diff -r f82b801a9e39 -r 0a289c9870a7 sys/dev/rndpool.c
--- a/sys/dev/rndpool.c Sat Jul 07 16:51:47 2001 +0000
+++ b/sys/dev/rndpool.c Sat Jul 07 17:04:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rndpool.c,v 1.10 2000/06/10 17:01:15 sommerfeld Exp $ */
+/* $NetBSD: rndpool.c,v 1.11 2001/07/07 17:04:02 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -311,8 +311,8 @@
(8 * RND_ENTROPY_THRESHOLD));
}
- bzero(&hash, sizeof(hash));
- bzero(digest, sizeof(digest));
+ memset(&hash, 0, sizeof(hash));
+ memset(digest, 0, sizeof(digest));
return (len - remain);
}
diff -r f82b801a9e39 -r 0a289c9870a7 sys/dev/vnd.c
--- a/sys/dev/vnd.c Sat Jul 07 16:51:47 2001 +0000
+++ b/sys/dev/vnd.c Sat Jul 07 17:04:01 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.71 2001/01/08 02:03:46 fvdl Exp $ */
+/* $NetBSD: vnd.c,v 1.72 2001/07/07 17:04:02 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -192,7 +192,7 @@
printf("WARNING: no memory for vnode disks\n");
return;
}
- bzero(mem, i);
+ memset(mem, 0, i);
vnd_softc = (struct vnd_softc *)mem;
numvnd = num;
@@ -762,7 +762,7 @@
*/
if (vio->vnd_flags & VNDIOF_HASGEOM) {
- bcopy(&vio->vnd_geom, &vnd->sc_geom,
+ memcpy(&vnd->sc_geom, &vio->vnd_geom,
sizeof(vio->vnd_geom));
/*
@@ -844,7 +844,7 @@
#endif
/* Attach the disk. */
- bzero(vnd->sc_xname, sizeof(vnd->sc_xname)); /* XXX */
+ memset(vnd->sc_xname, 0, sizeof(vnd->sc_xname)); /* XXX */
sprintf(vnd->sc_xname, "vnd%d", unit); /* XXX */
vnd->sc_dkdev.dk_name = vnd->sc_xname;
disk_attach(&vnd->sc_dkdev);
@@ -1143,7 +1143,7 @@
struct vndgeom *vng = &sc->sc_geom;
struct partition *pp;
- bzero(lp, sizeof(*lp));
+ memset(lp, 0, sizeof(*lp));
lp->d_secperunit = sc->sc_size / (vng->vng_secsize / DEV_BSIZE);
lp->d_secsize = vng->vng_secsize;
@@ -1183,7 +1183,7 @@
struct cpu_disklabel *clp = sc->sc_dkdev.dk_cpulabel;
int i;
- bzero(clp, sizeof(*clp));
+ memset(clp, 0, sizeof(*clp));
vndgetdefaultlabel(sc, lp);
Home |
Main Index |
Thread Index |
Old Index