Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mvme68k bzero -> memset



details:   https://anonhg.NetBSD.org/src/rev/3b3f6f054e18
branches:  trunk
changeset: 512169:3b3f6f054e18
user:      scw <scw%NetBSD.org@localhost>
date:      Sat Jul 07 07:51:37 2001 +0000

description:
bzero -> memset
bcopy -> memcpy
bcmp -> memcmp

diffstat:

 sys/arch/mvme68k/dev/if_ie.c        |   6 +++---
 sys/arch/mvme68k/dev/sbic.c         |   8 ++++----
 sys/arch/mvme68k/dev/zs.c           |  10 +++++-----
 sys/arch/mvme68k/mvme68k/bus_dma.c  |   6 +++---
 sys/arch/mvme68k/mvme68k/disksubr.c |  22 +++++++++++-----------
 sys/arch/mvme68k/mvme68k/isr.c      |   4 ++--
 sys/arch/mvme68k/mvme68k/machdep.c  |  16 ++++++++--------
 sys/arch/mvme68k/mvme68k/pmap.c     |  10 +++++-----
 sys/arch/mvme68k/mvme68k/trap.c     |   4 ++--
 9 files changed, 43 insertions(+), 43 deletions(-)

diffs (truncated from 327 to 300 lines):

diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/dev/if_ie.c
--- a/sys/arch/mvme68k/dev/if_ie.c      Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/dev/if_ie.c      Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ie.c,v 1.11 2001/05/31 18:46:07 scw Exp $ */
+/*     $NetBSD: if_ie.c,v 1.12 2001/07/07 07:51:37 scw Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -192,7 +192,7 @@
        bus_space_read_region_1(sc->bt, sc->bh, offset, dst, size);
 #else
        /* A minor optimisation ;-) */
-       bcopy((void *) ((u_long) sc->bh + (u_long) offset), dst, size);
+       memcpy(dst, (void *) ((u_long) sc->bh + (u_long) offset), size);
 #endif
 }
 
@@ -210,7 +210,7 @@
        bus_space_write_region_1(sc->bt, sc->bh, offset, src, size);
 #else
        /* A minor optimisation ;-) */
-       bcopy(src, (void *) ((u_long) sc->bh + (u_long) offset), size);
+       memcpy((void *) ((u_long) sc->bh + (u_long) offset), src, size);
 #endif
 }
 
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/dev/sbic.c
--- a/sys/arch/mvme68k/dev/sbic.c       Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/dev/sbic.c       Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sbic.c,v 1.16 2001/04/25 17:53:16 bouyer Exp $ */
+/*     $NetBSD: sbic.c,v 1.17 2001/07/07 07:51:37 scw Exp $    */
 
 /*
  * Changes Copyright (c) 1996 Steve Woodford
@@ -413,7 +413,7 @@
         acb->sc_kv.dc_addr  = xs->data;
         acb->sc_kv.dc_count = xs->datalen;
         acb->pa_addr        = xs->data ? (char *)kvtop((caddr_t)xs->data) : 0;
-        bcopy(xs->cmd, &acb->cmd, xs->cmdlen);
+        memcpy(&acb->cmd, xs->cmd, xs->cmdlen);
 
         if ( flags & XS_CTL_POLL ) {
             /*
@@ -814,14 +814,14 @@
         dev->sc_xs    = NULL;
 
         acb = dev->sc_acb;
-        bzero(acb, sizeof(dev->sc_acb));
+        memset(acb, 0, sizeof(dev->sc_acb));
 
         for (i = 0; i < sizeof(dev->sc_acb) / sizeof(*acb); i++) {
             TAILQ_INSERT_TAIL(&dev->free_list, acb, chain);
             acb++;
         }
 
-        bzero(dev->sc_tinfo, sizeof(dev->sc_tinfo));
+        memset(dev->sc_tinfo, 0, sizeof(dev->sc_tinfo));
 
 #ifdef DEBUG
         /*
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/dev/zs.c
--- a/sys/arch/mvme68k/dev/zs.c Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/dev/zs.c Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.27 2001/05/31 18:46:08 scw Exp $      */
+/*     $NetBSD: zs.c,v 1.28 2001/07/07 07:51:38 scw Exp $      */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -159,14 +159,14 @@
                 * adjust the console channel pointer.
                 */
                if (zsc_args.hwflags & ZS_HWFLAG_CONSOLE) {
-                       bcopy(zs_conschan, cs, sizeof(struct zs_chanstate));
+                       memcpy(cs, zs_conschan, sizeof(struct zs_chanstate));
                        zs_conschan = cs;
                } else {
                        zc = (channel == 0) ? &zs->zs_chan_a : &zs->zs_chan_b;
                        cs->cs_reg_csr  = zc->zc_csr;
                        cs->cs_reg_data = zc->zc_data;
-                       bcopy(zs_init_reg, cs->cs_creg, 16);
-                       bcopy(zs_init_reg, cs->cs_preg, 16);
+                       memcpy(cs->cs_creg, zs_init_reg, 16);
+                       memcpy(cs->cs_preg, zs_init_reg, 16);
                        cs->cs_defspeed = zs_defspeed[zsc_unit][channel];
                }
 
@@ -537,7 +537,7 @@
        cs->cs_reg_data = zc->zc_data;
 
        /* Initialize the pending registers. */
-       bcopy(zs_init_reg, cs->cs_preg, 16);
+       memcpy(cs->cs_preg, zs_init_reg, 16);
        cs->cs_preg[5] |= (ZSWR5_DTR | ZSWR5_RTS);
 
 #if 0
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/mvme68k/bus_dma.c
--- a/sys/arch/mvme68k/mvme68k/bus_dma.c        Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/bus_dma.c        Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.15 2001/05/26 21:27:10 chs Exp $     */
+/* $NetBSD: bus_dma.c,v 1.16 2001/07/07 07:51:38 scw Exp $     */
 
 /*
  * This file was taken from from next68k/dev/bus_dma.c, which was originally
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.15 2001/05/26 21:27:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.16 2001/07/07 07:51:38 scw Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -107,7 +107,7 @@
            (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL)
                return (ENOMEM);
 
-       bzero(mapstore, mapsize);
+       memset(mapstore, 0, mapsize);
        map = (struct mvme68k_bus_dmamap *)mapstore;
        map->_dm_size = size;
        map->_dm_segcnt = nsegments;
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/mvme68k/disksubr.c
--- a/sys/arch/mvme68k/mvme68k/disksubr.c       Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c       Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.20 2000/11/20 08:24:17 chs Exp $        */
+/*     $NetBSD: disksubr.c,v 1.21 2001/07/07 07:51:38 scw Exp $        */
 
 /*
  * Copyright (c) 1995 Dale Rahn.
@@ -91,7 +91,7 @@
        if (biowait(bp)) {
                msg = "cpu_disklabel read error\n";
        } else {
-               bcopy(bp->b_data, clp, sizeof (struct cpu_disklabel));
+               memcpy(clp, bp->b_data, sizeof (struct cpu_disklabel));
        }
 
        brelse(bp);
@@ -212,7 +212,7 @@
        if ( (error = biowait(bp)) != 0 ) {
                /* nothing */
        } else {
-               bcopy(bp->b_data, clp, sizeof(struct cpu_disklabel));
+               memcpy(clp, bp->b_data, sizeof(struct cpu_disklabel));
        }
 
        brelse(bp);
@@ -234,7 +234,7 @@
                /* obtain buffer to scrozz drive with */
                bp = geteblk((int)lp->d_secsize);
 
-               bcopy(clp, bp->b_data, sizeof(struct cpu_disklabel));
+               memcpy(bp->b_data, clp, sizeof(struct cpu_disklabel));
 
                /* request no partition relocation by driver on I/O operations */
                bp->b_dev = dev;
@@ -353,9 +353,9 @@
        clp->sbsize = lp->d_sbsize;
        clp->checksum = lp->d_checksum;
        /* note: assume at least 4 partitions */
-       bcopy(&lp->d_partitions[0], clp->vid_4, sizeof(struct partition) * 4);
-       bzero(clp->cfg_4, sizeof(struct partition) * 12);
-       bcopy(&lp->d_partitions[4], clp->cfg_4, sizeof(struct partition) 
+       memcpy(clp->vid_4, &lp->d_partitions[0], sizeof(struct partition) * 4);
+       memset(clp->cfg_4, 0, sizeof(struct partition) * 12);
+       memcpy(clp->cfg_4, &lp->d_partitions[4], sizeof(struct partition) 
                * ((MAXPARTITIONS < 16) ? (MAXPARTITIONS - 4) : 12));
 
        /*
@@ -363,14 +363,14 @@
         * see disklabel.h for more details
         * [note: this used to be handled by 'wrtvid']
         */
-       bcopy(VID_ID, clp->vid_id, sizeof(clp->vid_id));
+       memcpy(clp->vid_id, VID_ID, sizeof(clp->vid_id));
        clp->vid_oss = VID_OSS;
        clp->vid_osl = VID_OSL;
        clp->vid_osa_u = VID_OSAU;
        clp->vid_osa_l = VID_OSAL;
        clp->vid_cas = VID_CAS;
        clp->vid_cal = VID_CAL;
-       bcopy(VID_MOT, clp->vid_mot, sizeof(clp->vid_mot));
+       memcpy(clp->vid_mot, VID_MOT, sizeof(clp->vid_mot));
        clp->cfg_rec = CFG_REC;
        clp->cfg_psm = CFG_PSM;
 }
@@ -437,8 +437,8 @@
        lp->d_bbsize = clp->bbsize;
        lp->d_sbsize = clp->sbsize;
        /* note: assume at least 4 partitions */
-       bcopy(clp->vid_4, &lp->d_partitions[0], sizeof(struct partition) * 4);
-       bcopy(clp->cfg_4, &lp->d_partitions[4], sizeof(struct partition) 
+       memcpy(&lp->d_partitions[0], clp->vid_4, sizeof(struct partition) * 4);
+       memcpy(&lp->d_partitions[4], clp->cfg_4, sizeof(struct partition) 
                * ((MAXPARTITIONS < 16) ? (MAXPARTITIONS - 4) : 12));
        lp->d_checksum = 0;
        lp->d_checksum = dkcksum(lp);
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/mvme68k/isr.c
--- a/sys/arch/mvme68k/mvme68k/isr.c    Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/isr.c    Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isr.c,v 1.23 2001/07/06 19:00:14 scw Exp $     */
+/*     $NetBSD: isr.c,v 1.24 2001/07/07 07:51:38 scw Exp $     */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -227,7 +227,7 @@
 #endif
 
        vectab[vec] = badtrap;
-       bzero(&isr_vectored[vec - ISRVECTORED], sizeof(struct isr_vectored));
+       memset(&isr_vectored[vec - ISRVECTORED], 0, sizeof(struct isr_vectored));
 }
 
 /*
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/mvme68k/machdep.c
--- a/sys/arch/mvme68k/mvme68k/machdep.c        Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/machdep.c        Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.83 2001/06/10 16:48:19 scw Exp $ */
+/*     $NetBSD: machdep.c,v 1.84 2001/07/07 07:51:38 scw Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -630,11 +630,11 @@
        char fpu_str[16];
        int len = 0;
 
-       bzero(cpu_model, sizeof(cpu_model));
-       bzero(board_str, sizeof(board_str));
-       bzero(cpu_str, sizeof(cpu_str));
-       bzero(mmu_str, sizeof(mmu_str));
-       bzero(fpu_str, sizeof(cpu_str));
+       memset(cpu_model, 0, sizeof(cpu_model));
+       memset(board_str, 0, sizeof(board_str));
+       memset(cpu_str, 0, sizeof(cpu_str));
+       memset(mmu_str, 0, sizeof(mmu_str));
+       memset(fpu_str, 0, sizeof(cpu_str));
 
        /* Fill in the CPU string. */
        switch (cputype) {
@@ -851,7 +851,7 @@
        int i;
        extern char end[];
 
-       bzero(&cpu_kcore_hdr, sizeof(cpu_kcore_hdr)); 
+       memset(&cpu_kcore_hdr, 0, sizeof(cpu_kcore_hdr)); 
 
        /*
         * Initialize the `dispatcher' portion of the header.
@@ -955,7 +955,7 @@
        CORE_SETMAGIC(*kseg, KCORE_MAGIC, MID_MACHINE, CORE_CPU);
        kseg->c_size = dbtob(1) - ALIGN(sizeof(kcore_seg_t));
 
-       bcopy(&cpu_kcore_hdr, chdr, sizeof(cpu_kcore_hdr_t));
+       memcpy(chdr, &cpu_kcore_hdr, sizeof(cpu_kcore_hdr_t));
        error = (*dump)(dumpdev, *blknop, (caddr_t)buf, sizeof(buf));
        *blknop += btodb(sizeof(buf));
        return (error);
diff -r 5e7f2219b565 -r 3b3f6f054e18 sys/arch/mvme68k/mvme68k/pmap.c
--- a/sys/arch/mvme68k/mvme68k/pmap.c   Sat Jul 07 07:04:56 2001 +0000
+++ b/sys/arch/mvme68k/mvme68k/pmap.c   Sat Jul 07 07:51:37 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.62 2001/06/02 18:09:16 chs Exp $        */
+/*     $NetBSD: pmap.c,v 1.63 2001/07/07 07:51:39 scw Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -748,7 +748,7 @@
            ("pmap_create()\n"));
 
        pmap = pool_get(&pmap_pmap_pool, PR_WAITOK);
-       bzero(pmap, sizeof(*pmap));
+       memset(pmap, 0, sizeof(*pmap));
        pmap_pinit(pmap);
        return (pmap);
 }
@@ -1719,7 +1719,7 @@
  * pmap_zero_page:             [ INTERFACE ]
  *
  *     Zero the specified (machine independent) page by mapping the page
- *     into virtual memory and using bzero to clear its contents, one
+ *     into virtual memory and using memset to clear its contents, one
  *     machine dependent page at a time.
  *
  *     Note: WE DO NOT CURRENTLY LOCK THE TEMPORARY ADDRESSES!
@@ -2453,7 +2453,7 @@
                                panic("enter: out of address space"); /* XXX */
                        pmap->pm_stfree &= ~l2tobm(ix);
                        addr = (caddr_t)&pmap->pm_stab[ix*SG4_LEV2SIZE];
-                       bzero(addr, SG4_LEV2SIZE*sizeof(st_entry_t));
+                       memset(addr, 0, SG4_LEV2SIZE*sizeof(st_entry_t));
                        addr = (caddr_t)&pmap->pm_stpa[ix*SG4_LEV2SIZE];
                        *ste = (u_int)addr | SG_RW | SG_U | SG_V;
 



Home | Main Index | Thread Index | Old Index