diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-23 07:06:17 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-05-23 07:06:17 +0000 |
commit | 7e803234e0920a8f5b5ecfb63c99ab9895709888 (patch) | |
tree | 8b1279f26b92580f60518487684f810524827ce4 /sys | |
parent | 51f7e1263318c3fc9c7dc79d89556d7cde372dd1 (diff) |
Don't bzero() data before calling scsi_mode_sense[_big]() since
scsi_mode_sense[_big] bzero()'s it.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/cd_atapi.c | 6 | ||||
-rw-r--r-- | sys/scsi/cd_scsi.c | 6 | ||||
-rw-r--r-- | sys/scsi/ch.c | 4 | ||||
-rw-r--r-- | sys/scsi/sd_scsi.c | 6 |
4 files changed, 4 insertions, 18 deletions
diff --git a/sys/scsi/cd_atapi.c b/sys/scsi/cd_atapi.c index 38247b0c689..4d1f672c322 100644 --- a/sys/scsi/cd_atapi.c +++ b/sys/scsi/cd_atapi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd_atapi.c,v 1.6 2005/05/23 06:46:38 krw Exp $ */ +/* $OpenBSD: cd_atapi.c,v 1.7 2005/05/23 07:06:16 krw Exp $ */ /* $NetBSD: cd_atapi.c,v 1.10 1998/08/31 22:28:06 cgd Exp $ */ /* @@ -92,7 +92,6 @@ cd_atapibus_setchan(cd, p0, p1, p2, p3, flags) struct atapi_cd_mode_data data; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense_big(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header_big *)&data, sizeof(data), flags, 20000); if (error != 0) @@ -118,7 +117,6 @@ cd_atapibus_getvol(cd, arg, flags) struct atapi_cd_mode_data data; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense_big(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header_big *)&data, sizeof(data), flags, 20000); if (error != 0) @@ -141,13 +139,11 @@ cd_atapibus_setvol(cd, arg, flags) struct atapi_cd_mode_data data, mask; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense_big(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header_big *)&data, sizeof(data), flags, 20000); if (error != 0) return (error); - bzero(&mask, sizeof(mask)); error = scsi_mode_sense_big(cd->sc_link, 0, ATAPI_AUDIO_PAGE_MASK, (struct scsi_mode_header_big *)&mask, sizeof(mask), flags, 20000); if (error != 0) diff --git a/sys/scsi/cd_scsi.c b/sys/scsi/cd_scsi.c index 760cdac868b..b8791d16e3e 100644 --- a/sys/scsi/cd_scsi.c +++ b/sys/scsi/cd_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd_scsi.c,v 1.7 2005/05/14 00:20:43 krw Exp $ */ +/* $OpenBSD: cd_scsi.c,v 1.8 2005/05/23 07:06:16 krw Exp $ */ /* $NetBSD: cd_scsi.c,v 1.14 1998/08/31 22:28:06 cgd Exp $ */ /*- @@ -98,7 +98,6 @@ cd_scsibus_set_pa_immed(cd, flags) struct scsi_cd_mode_data data; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header *)&data, AUDIOPAGESIZE, flags, 20000); if (error != 0) @@ -120,7 +119,6 @@ cd_scsibus_setchan(cd, p0, p1, p2, p3, flags) struct scsi_cd_mode_data data; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header *)&data, AUDIOPAGESIZE, flags, 20000); if (error != 0) @@ -145,7 +143,6 @@ cd_scsibus_getvol(cd, arg, flags) struct scsi_cd_mode_data data; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header *)&data, AUDIOPAGESIZE, flags, 20000); if (error != 0) @@ -168,7 +165,6 @@ cd_scsibus_setvol(cd, arg, flags) struct scsi_cd_mode_data data; int error; - bzero(&data, sizeof(data)); error = scsi_mode_sense(cd->sc_link, 0, AUDIO_PAGE, (struct scsi_mode_header *)&data, AUDIOPAGESIZE, flags, 20000); if (error != 0) diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index 568a1eb9814..77d0e4cb2bb 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ch.c,v 1.19 2005/05/14 00:20:43 krw Exp $ */ +/* $OpenBSD: ch.c,v 1.20 2005/05/23 07:06:16 krw Exp $ */ /* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */ /* @@ -627,7 +627,6 @@ ch_get_params(sc, flags) /* * Grab info from the element address assignment page (0x1d). */ - bzero(&sense_data, sizeof(sense_data)); error = scsi_mode_sense(sc->sc_link, SMS_DBD, 0x1d, (struct scsi_mode_header *)&sense_data, sizeof(sense_data), flags, 6000); @@ -651,7 +650,6 @@ ch_get_params(sc, flags) /* * Grab info from the capabilities page (0x1f). */ - bzero(&sense_data, sizeof(sense_data)); error = scsi_mode_sense(sc->sc_link, SMS_DBD, 0x1f, (struct scsi_mode_header *)&sense_data, sizeof(sense_data), flags, 6000); diff --git a/sys/scsi/sd_scsi.c b/sys/scsi/sd_scsi.c index d6498e66943..a29b4688eeb 100644 --- a/sys/scsi/sd_scsi.c +++ b/sys/scsi/sd_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd_scsi.c,v 1.9 2005/05/14 00:20:43 krw Exp $ */ +/* $OpenBSD: sd_scsi.c,v 1.10 2005/05/23 07:06:16 krw Exp $ */ /* $NetBSD: sd_scsi.c,v 1.8 1998/10/08 20:21:13 thorpej Exp $ */ /*- @@ -107,7 +107,6 @@ sd_scsibus_get_optparms(sd, dp, flags) * However, there are stupid optical devices which does NOT * support the page 6. Ask for all (0x3f) pages. Ghaa.... */ - bzero(&scsi_sense, sizeof(scsi_sense)); error = scsi_mode_sense(sd->sc_link, 0, 0x3f, (struct scsi_mode_header *)&scsi_sense, sizeof(scsi_sense), flags, 6000); @@ -152,7 +151,6 @@ sd_scsibus_get_parms(sd, dp, flags) if (sd->type == T_OPTICAL) return (sd_scsibus_get_optparms(sd, dp, flags)); - bzero(&scsi_sense, sizeof(scsi_sense)); error = scsi_mode_sense(sd->sc_link, 0, page = 4, (struct scsi_mode_header *)&scsi_sense, sizeof(scsi_sense), flags | SCSI_SILENT, 6000); @@ -201,7 +199,6 @@ sd_scsibus_get_parms(sd, dp, flags) return (SDGP_RESULT_OK); } - bzero(&scsi_sense, sizeof(scsi_sense)); error = scsi_mode_sense(sd->sc_link, 0, page = 5, (struct scsi_mode_header *)&scsi_sense, sizeof(scsi_sense), flags | SCSI_SILENT, 6000); @@ -229,7 +226,6 @@ sd_scsibus_get_parms(sd, dp, flags) } /* T_RDIRECT define page 6. */ - bzero(&scsi_sense, sizeof(scsi_sense)); error = scsi_mode_sense(sd->sc_link, 0, page = 6, (struct scsi_mode_header *)&scsi_sense, sizeof(scsi_sense), flags | SCSI_SILENT, 6000); |