Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi bzero -> memset



details:   https://anonhg.NetBSD.org/src/rev/a4c43f344df1
branches:  trunk
changeset: 512876:a4c43f344df1
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jul 18 18:21:04 2001 +0000

description:
bzero -> memset

diffstat:

 sys/dev/scsipi/cd.c           |  22 +++++++++++-----------
 sys/dev/scsipi/cd_atapi.c     |   4 ++--
 sys/dev/scsipi/ch.c           |  22 +++++++++++-----------
 sys/dev/scsipi/if_se.c        |   4 ++--
 sys/dev/scsipi/scsi_base.c    |   4 ++--
 sys/dev/scsipi/scsipi_base.c  |  22 +++++++++++-----------
 sys/dev/scsipi/scsipi_ioctl.c |   4 ++--
 sys/dev/scsipi/sd.c           |  18 +++++++++---------
 sys/dev/scsipi/sd_atapi.c     |   4 ++--
 sys/dev/scsipi/sd_scsi.c      |   6 +++---
 sys/dev/scsipi/ses.c          |   4 ++--
 sys/dev/scsipi/ss_mustek.c    |  18 +++++++++---------
 sys/dev/scsipi/ss_scanjet.c   |   8 ++++----
 sys/dev/scsipi/st.c           |  26 +++++++++++++-------------
 sys/dev/scsipi/st_scsi.c      |   8 ++++----
 15 files changed, 87 insertions(+), 87 deletions(-)

diffs (truncated from 754 to 300 lines):

diff -r e8492174b4fb -r a4c43f344df1 sys/dev/scsipi/cd.c
--- a/sys/dev/scsipi/cd.c       Wed Jul 18 18:17:58 2001 +0000
+++ b/sys/dev/scsipi/cd.c       Wed Jul 18 18:21:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd.c,v 1.151 2001/06/26 15:32:03 bouyer Exp $  */
+/*     $NetBSD: cd.c,v 1.152 2001/07/18 18:21:04 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -687,7 +687,7 @@
                        /*
                         * We can fit in a small cdb.
                         */
-                       bzero(&cmd_small, sizeof(cmd_small));
+                       memset(&cmd_small, 0, sizeof(cmd_small));
                        cmd_small.opcode = (bp->b_flags & B_READ) ?
                            SCSI_READ_COMMAND : SCSI_WRITE_COMMAND;
                        _lto3b(bp->b_rawblkno, cmd_small.addr);
@@ -700,7 +700,7 @@
                        /*
                         * Need a large cdb.
                         */
-                       bzero(&cmd_big, sizeof(cmd_big));
+                       memset(&cmd_big, 0, sizeof(cmd_big));
                        cmd_big.opcode = (bp->b_flags & B_READ) ?
                            READ_BIG : WRITE_BIG;
                        _lto4b(bp->b_rawblkno, cmd_big.addr);
@@ -1253,7 +1253,7 @@
        struct disklabel *lp;
 {
 
-       bzero(lp, sizeof(struct disklabel));
+       memset(lp, 0, sizeof(struct disklabel));
 
        lp->d_secsize = cd->params.blksize;
        lp->d_ntracks = 1;
@@ -1308,7 +1308,7 @@
 {
        struct disklabel *lp = cd->sc_dk.dk_label;
 
-       bzero(cd->sc_dk.dk_cpulabel, sizeof(struct cpu_disklabel));
+       memset(cd->sc_dk.dk_cpulabel, 0, sizeof(struct cpu_disklabel));
 
        cdgetdefaultlabel(cd, lp);
 }
@@ -1340,7 +1340,7 @@
         * make up a scsi command and ask the scsi driver to do
         * it for you.
         */
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = READ_CD_CAPACITY;
 
        /*
@@ -1378,7 +1378,7 @@
 {
        struct scsipi_play scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = PLAY;
        _lto4b(blkno, scsipi_cmd.blk_addr);
        _lto2b(nblks, scsipi_cmd.xfer_len);
@@ -1432,7 +1432,7 @@
 {
        struct scsipi_play_msf scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = PLAY_MSF;
        scsipi_cmd.start_m = startm;
        scsipi_cmd.start_s = starts;
@@ -1455,7 +1455,7 @@
 {
        struct scsipi_pause scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = PAUSE;
        scsipi_cmd.resume = go & 0xff;
        return (scsipi_command(cd->sc_periph,
@@ -1487,7 +1487,7 @@
 {
        struct scsipi_read_subchannel scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = READ_SUBCHANNEL;
        if (mode == CD_MSF_FORMAT)
                scsipi_cmd.byte2 |= CD_MSF;
@@ -1514,7 +1514,7 @@
        struct scsipi_read_toc scsipi_cmd;
        int ntoc;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
 #if 0
        if (len != sizeof(struct ioc_toc_header))
                ntoc = ((len) - sizeof(struct ioc_toc_header)) /
diff -r e8492174b4fb -r a4c43f344df1 sys/dev/scsipi/cd_atapi.c
--- a/sys/dev/scsipi/cd_atapi.c Wed Jul 18 18:17:58 2001 +0000
+++ b/sys/dev/scsipi/cd_atapi.c Wed Jul 18 18:21:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd_atapi.c,v 1.15 2001/05/14 20:35:28 bouyer Exp $     */
+/*     $NetBSD: cd_atapi.c,v 1.16 2001/07/18 18:21:05 thorpej Exp $    */
 
 /*
  * Copyright (c) 1997 Manuel Bouyer.  All rights reserved.
@@ -231,7 +231,7 @@
 {
        struct atapi_load_unload atapi_cmd;
 
-       bzero(&atapi_cmd, sizeof(atapi_cmd));
+       memset(&atapi_cmd, 0, sizeof(atapi_cmd));
        atapi_cmd.opcode = ATAPI_LOAD_UNLOAD;
        atapi_cmd.options = options;    /* ioctl uses ATAPI values */
        atapi_cmd.slot = slot;
diff -r e8492174b4fb -r a4c43f344df1 sys/dev/scsipi/ch.c
--- a/sys/dev/scsipi/ch.c       Wed Jul 18 18:17:58 2001 +0000
+++ b/sys/dev/scsipi/ch.c       Wed Jul 18 18:21:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ch.c,v 1.46 2001/06/19 10:43:26 lukem Exp $    */
+/*     $NetBSD: ch.c,v 1.47 2001/07/18 18:21:05 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -566,7 +566,7 @@
        /*
         * Build the SCSI command.
         */
-       bzero(&cmd, sizeof(cmd));
+       memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = MOVE_MEDIUM;
        _lto2b(sc->sc_picker, cmd.tea);
        _lto2b(fromelem, cmd.src);
@@ -620,7 +620,7 @@
        /*
         * Build the SCSI command.
         */
-       bzero(&cmd, sizeof(cmd));
+       memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = EXCHANGE_MEDIUM;
        _lto2b(sc->sc_picker, cmd.tea);
        _lto2b(src, cmd.src);
@@ -663,7 +663,7 @@
        /*
         * Build the SCSI command.
         */
-       bzero(&cmd, sizeof(cmd));
+       memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = POSITION_TO_ELEMENT;
        _lto2b(sc->sc_picker, cmd.tea);
        _lto2b(dst, cmd.dst);
@@ -1009,7 +1009,7 @@
        /*
         * Build SCSI command.
         */
-       bzero(&cmd, sizeof(cmd));
+       memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = READ_ELEMENT_STATUS;
        cmd.byte2 = ELEMENT_TYPE_ALL;
        if (flags & CESR_VOLTAGS)
@@ -1052,7 +1052,7 @@
        /*
         * Build the SCSI command.
         */
-       bzero(&cmd, sizeof(cmd));
+       memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = SEND_VOLUME_TAG;
        _lto2b(dst, cmd.eaddr);
 
@@ -1105,7 +1105,7 @@
        /*
         * Build SCSI command.
         */
-       bzero(&cmd, sizeof(cmd));
+       memset(&cmd, 0, sizeof(cmd));
        cmd.opcode = INITIALIZE_ELEMENT_STATUS;
 
        /*
@@ -1155,7 +1155,7 @@
        /*
         * Grab info from the element address assignment page.
         */
-       bzero(&sense_data, sizeof(sense_data));
+       memset(&sense_data, 0, sizeof(sense_data));
        error = scsipi_mode_sense(sc->sc_periph, SMS_DBD, 0x1d,
            &sense_data.header, sizeof(sense_data),
            scsiflags | XS_CTL_DATA_ONSTACK, CHRETRIES, 6000);
@@ -1179,7 +1179,7 @@
        /*
         * Grab info from the capabilities page.
         */
-       bzero(&sense_data, sizeof(sense_data));
+       memset(&sense_data, 0, sizeof(sense_data));
        /*
         * XXX: Note: not all changers can deal with disabled block descriptors
         */
@@ -1192,8 +1192,8 @@
                return (error);
        }
 
-       bzero(sc->sc_movemask, sizeof(sc->sc_movemask));
-       bzero(sc->sc_exchangemask, sizeof(sc->sc_exchangemask));
+       memset(sc->sc_movemask, 0, sizeof(sc->sc_movemask));
+       memset(sc->sc_exchangemask, 0, sizeof(sc->sc_exchangemask));
        moves = &sense_data.pages.cap.move_from_mt;
        exchanges = &sense_data.pages.cap.exchange_with_mt;
        for (from = CHET_MT; from <= CHET_DT; ++from) {
diff -r e8492174b4fb -r a4c43f344df1 sys/dev/scsipi/if_se.c
--- a/sys/dev/scsipi/if_se.c    Wed Jul 18 18:17:58 2001 +0000
+++ b/sys/dev/scsipi/if_se.c    Wed Jul 18 18:21:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_se.c,v 1.34 2001/04/25 17:53:39 bouyer Exp $        */
+/*     $NetBSD: if_se.c,v 1.35 2001/07/18 18:21:05 thorpej Exp $       */
 
 /*
  * Copyright (c) 1997 Ian W. Dall <ian.dall%dsto.defence.gov.au@localhost>
@@ -465,7 +465,7 @@
                        printf("se: packet size %d (%d) < %d\n", len,
                            cp - (u_char *)sc->sc_tbuf, SEMINSIZE);
 #endif
-               bzero(cp, SEMINSIZE - len);
+               memset(cp, 0, SEMINSIZE - len);
                len = SEMINSIZE;
        }
 
diff -r e8492174b4fb -r a4c43f344df1 sys/dev/scsipi/scsi_base.c
--- a/sys/dev/scsipi/scsi_base.c        Wed Jul 18 18:17:58 2001 +0000
+++ b/sys/dev/scsipi/scsi_base.c        Wed Jul 18 18:21:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsi_base.c,v 1.74 2001/04/25 17:53:39 bouyer Exp $    */
+/*     $NetBSD: scsi_base.c,v 1.75 2001/07/18 18:21:05 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 {
        struct scsi_changedef scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = SCSI_CHANGE_DEFINITION;
        scsipi_cmd.how = SC_SCSI_2;
 
diff -r e8492174b4fb -r a4c43f344df1 sys/dev/scsipi/scsipi_base.c
--- a/sys/dev/scsipi/scsipi_base.c      Wed Jul 18 18:17:58 2001 +0000
+++ b/sys/dev/scsipi/scsipi_base.c      Wed Jul 18 18:21:04 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_base.c,v 1.49 2001/07/13 20:00:23 bouyer Exp $  */
+/*     $NetBSD: scsipi_base.c,v 1.50 2001/07/18 18:21:05 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -949,7 +949,7 @@
        struct scsipi_read_cap_data rdcap;
        struct scsipi_read_capacity scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = READ_CAPACITY;
 
        /*
@@ -984,7 +984,7 @@
        if (periph->periph_quirks & PQUIRK_NOTUR)
                return (0);
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = TEST_UNIT_READY;
 
        return (scsipi_command(periph,
@@ -1005,7 +1005,7 @@
 {
        struct scsipi_inquiry scsipi_cmd;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = INQUIRY;
        scsipi_cmd.length = sizeof(struct scsipi_inquiry_data);
 
@@ -1030,7 +1030,7 @@
        if (periph->periph_quirks & PQUIRK_NODOORLOCK)
                return (0);
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = PREVENT_ALLOW;
        scsipi_cmd.how = type;
 
@@ -1054,7 +1054,7 @@
        if (periph->periph_quirks & PQUIRK_NOSTARTUNIT)
                return 0;
 
-       bzero(&scsipi_cmd, sizeof(scsipi_cmd));
+       memset(&scsipi_cmd, 0, sizeof(scsipi_cmd));
        scsipi_cmd.opcode = START_STOP;
        scsipi_cmd.byte2 = 0x00;
        scsipi_cmd.how = type;
@@ -1079,7 +1079,7 @@



Home | Main Index | Thread Index | Old Index