Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi bcopy -> memcpy



details:   https://anonhg.NetBSD.org/src/rev/b0ba6b992d4e
branches:  trunk
changeset: 512878:b0ba6b992d4e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jul 18 18:25:41 2001 +0000

description:
bcopy -> memcpy

diffstat:

 sys/dev/scsipi/cd.c           |   4 ++--
 sys/dev/scsipi/if_se.c        |  12 ++++++------
 sys/dev/scsipi/scsipi_base.h  |   4 ++--
 sys/dev/scsipi/scsipi_ioctl.c |   4 ++--
 sys/dev/scsipi/ses.c          |   6 +++---
 sys/dev/scsipi/ss.c           |   4 ++--
 sys/dev/scsipi/ss_mustek.c    |   4 ++--
 sys/dev/scsipi/ss_scanjet.c   |   4 ++--
 sys/dev/scsipi/st_scsi.c      |   6 +++---
 9 files changed, 24 insertions(+), 24 deletions(-)

diffs (209 lines):

diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/cd.c       Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.152 2001/07/18 18:21:04 thorpej Exp $ */
+/*     $NetBSD: cd.c,v 1.153 2001/07/18 18:25:41 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1059,7 +1059,7 @@
 #endif
                } else
                        th.len = ntohs(th.len);
-               bcopy(&th, addr, sizeof(th));
+               memcpy(addr, &th, sizeof(th));
                return (0);
        }
        case CDIOREADTOCENTRYS: {
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/if_se.c
--- a/sys/dev/scsipi/if_se.c    Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/if_se.c    Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_se.c,v 1.35 2001/07/18 18:21:05 thorpej Exp $       */
+/*     $NetBSD: if_se.c,v 1.36 2001/07/18 18:25:41 thorpej Exp $       */
 
 /*
  * Copyright (c) 1997 Ian W. Dall <ian.dall%dsto.defence.gov.au@localhost>
@@ -348,7 +348,7 @@
        se_get_addr(sc, myaddr);
 
        /* 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 = se_ifstart;
        ifp->if_ioctl = se_ioctl;
@@ -454,7 +454,7 @@
        /* Chain; copy into linear buffer we allocated at attach time. */
        cp = sc->sc_tbuf;
        for (m = m0; m != NULL; ) {
-               bcopy(mtod(m, u_char *), cp, m->m_len);
+               memcpy(cp, mtod(m, u_char *), m->m_len);
                cp += m->m_len;
                MFREE(m, m0);
                m = m0;
@@ -620,7 +620,7 @@
                }
 
                m->m_len = len = min(totlen, len);
-               bcopy(data, mtod(m, caddr_t), len);
+               memcpy(mtod(m, caddr_t), data, len);
                data += len;
 
                totlen -= len;
@@ -1017,8 +1017,8 @@
                                ina->x_host =
                                    *(union ns_host *)LLADDR(ifp->if_sadl);
                        else
-                               bcopy(ina->x_host.c_host,
-                                   LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
+                               memcpy(LLADDR(ifp->if_sadl),
+                                   ina->x_host.c_host, ETHER_ADDR_LEN);
                        /* Set new address. */
 
                        error = se_init(sc);
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/scsipi_base.h
--- a/sys/dev/scsipi/scsipi_base.h      Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/scsipi_base.h      Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.h,v 1.11 2001/04/25 17:53:40 bouyer Exp $  */
+/*     $NetBSD: scsipi_base.h,v 1.12 2001/07/18 18:25:41 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
         * Fill out the scsipi_xfer structure.  We don't know whose context
         * the cmd is in, so copy it.
         */
-       bcopy(scsipi_cmd, &xs->cmdstore, cmdlen);
+       memcpy(&xs->cmdstore, scsipi_cmd, cmdlen);
        xs->cmd = &xs->cmdstore;
        xs->cmdlen = cmdlen;
        xs->data = data_addr;
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/scsipi_ioctl.c
--- a/sys/dev/scsipi/scsipi_ioctl.c     Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/scsipi_ioctl.c     Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_ioctl.c,v 1.39 2001/07/18 18:21:05 thorpej Exp $        */
+/*     $NetBSD: scsipi_ioctl.c,v 1.40 2001/07/18 18:25:41 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -181,7 +181,7 @@
                SC_DEBUG(periph, SCSIPI_DB3, ("have short sense\n"));
                screq->senselen_used = min(sizeof(xs->sense.atapi_sense),
                    SENSEBUFLEN);
-               bcopy(&xs->sense.scsi_sense, screq->sense, screq->senselen);
+               memcpy(screq->sense, &xs->sense.scsi_sense, screq->senselen);
                screq->retsts = SCCMD_UNKNOWN; /* XXX need a shortsense here */
                break;
        case XS_DRIVER_STUFFUP:
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/ses.c
--- a/sys/dev/scsipi/ses.c      Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/ses.c      Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ses.c,v 1.10 2001/07/18 18:21:06 thorpej Exp $ */
+/*     $NetBSD: ses.c,v 1.11 2001/07/18 18:25:41 thorpej Exp $ */
 /*
  * Copyright (C) 2000 National Aeronautics & Space Administration
  * All rights reserved.
@@ -125,7 +125,7 @@
 #define        SES_MALLOC(amt)         malloc(amt, M_DEVBUF, M_NOWAIT)
 #define        SES_FREE(ptr, amt)      free(ptr, M_DEVBUF)
 #define        MEMZERO(dest, amt)      memset(dest, 0, amt)
-#define        MEMCPY(dest, src, amt)  bcopy(src, dest, amt)
+#define        MEMCPY(dest, src, amt)  memcpy(dest, src, amt)
 #define        RECEIVE_DIAGNOSTIC      0x1c
 #define        SEND_DIAGNOSTIC         0x1d
 #define        WRITE_BUFFER            0x3b
@@ -511,7 +511,7 @@
        if (cdbl > sizeof (struct scsipi_generic)) {
                cdbl = sizeof (struct scsipi_generic);
        }
-       bcopy(cdb, &sgen, cdbl);
+       memcpy(&sgen, cdb, cdbl);
 #ifndef        SCSIDEBUG
        flg |= XS_CTL_SILENT;
 #endif
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/ss.c
--- a/sys/dev/scsipi/ss.c       Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/ss.c       Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ss.c,v 1.35 2001/06/26 12:46:56 bouyer Exp $   */
+/*     $NetBSD: ss.c,v 1.36 2001/07/18 18:25:41 thorpej Exp $  */
 
 /*
  * Copyright (c) 1995 Kenneth Stailey.  All rights reserved.
@@ -529,7 +529,7 @@
                        /* XXX add code for SCSI2 scanner, if any */
                        return (EOPNOTSUPP);
                }
-               bcopy(&ss->sio, addr, sizeof(struct scan_io));
+               memcpy(addr, &ss->sio, sizeof(struct scan_io));
                break;
        case SCIOCSET:
                sio = (struct scan_io *)addr;
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/ss_mustek.c
--- a/sys/dev/scsipi/ss_mustek.c        Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/ss_mustek.c        Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ss_mustek.c,v 1.14 2001/07/18 18:21:06 thorpej Exp $   */
+/*     $NetBSD: ss_mustek.c,v 1.15 2001/07/18 18:25:41 thorpej Exp $   */
 
 /*
  * Copyright (c) 1995 Joachim Koenig-Baltes.  All rights reserved.
@@ -238,7 +238,7 @@
 
        /* change ss_softc to the new values, but save ro-variables */
        sio->scan_scanner_type = ss->sio.scan_scanner_type;
-       bcopy(sio, &ss->sio, sizeof(struct scan_io));
+       memcpy(&ss->sio, sio, sizeof(struct scan_io));
 
        mustek_compute_sizes(ss);
 
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/ss_scanjet.c
--- a/sys/dev/scsipi/ss_scanjet.c       Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/ss_scanjet.c       Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ss_scanjet.c,v 1.23 2001/07/18 18:21:06 thorpej Exp $  */
+/*     $NetBSD: ss_scanjet.c,v 1.24 2001/07/18 18:25:41 thorpej Exp $  */
 
 /*
  * Copyright (c) 1995 Kenneth Stailey.  All rights reserved.
@@ -209,7 +209,7 @@
 
        /* change ss_softc to the new values, but save ro-variables */
        sio->scan_scanner_type = ss->sio.scan_scanner_type;
-       bcopy(sio, &ss->sio, sizeof(struct scan_io));
+       memcpy(&ss->sio, sio, sizeof(struct scan_io));
 
        error = scanjet_set_window(ss);
        if (error) {
diff -r ff94947ee140 -r b0ba6b992d4e sys/dev/scsipi/st_scsi.c
--- a/sys/dev/scsipi/st_scsi.c  Wed Jul 18 18:25:29 2001 +0000
+++ b/sys/dev/scsipi/st_scsi.c  Wed Jul 18 18:25:41 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: st_scsi.c,v 1.3 2001/07/18 18:21:06 thorpej Exp $ */
+/*     $NetBSD: st_scsi.c,v 1.4 2001/07/18 18:25:41 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -232,7 +232,7 @@
            ("%sbuffered\n",
            scsipi_sense.header.dev_spec & SMH_DSP_BUFF_MODE ? "" : "un"));
        if (st->page_0_size)
-               bcopy(scsipi_sense.sense_data, st->sense_data,
+               memcpy(st->sense_data, scsipi_sense.sense_data,
                    st->page_0_size);
        periph->periph_flags |= PERIPH_MEDIA_LOADED;
        return (0);
@@ -283,7 +283,7 @@
        if (st->flags & ST_FIXEDBLOCKS)
                _lto3b(st->blksize, scsi_select.blk_desc.blklen);
        if (st->page_0_size)
-               bcopy(st->sense_data, scsi_select.sense_data, st->page_0_size);
+               memcpy(scsi_select.sense_data, st->sense_data, st->page_0_size);
 
        /*
         * do the command



Home | Main Index | Thread Index | Old Index