summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2010-07-25 15:39:32 +0000
committerkrw <krw@openbsd.org>2010-07-25 15:39:32 +0000
commit134bbb4934f43f7e0144bd4166a229455f23d87d (patch)
tree9ba5e533d6e4a3a31dabe08cc4eab0171a1acec0
parentWhen using GCC, we always want GNU inline semantics. Fixes issues with (diff)
downloadwireguard-openbsd-134bbb4934f43f7e0144bd4166a229455f23d87d.tar.xz
wireguard-openbsd-134bbb4934f43f7e0144bd4166a229455f23d87d.zip
Restore previous behaviour of always bzero()'ing the buf passed to
scsi_inquire_vpd(). scsi_inquire_vpd() oddness noted by jsg@ after report of macppc problems by kili@.
-rw-r--r--sys/scsi/scsi_base.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 5d7d4f9ff91..2fe3eff8538 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.186 2010/07/24 04:01:52 matthew Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.187 2010/07/25 15:39:32 krw Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -806,6 +806,8 @@ scsi_inquire_vpd(struct scsi_link *sc_link, void *buf, u_int buflen,
struct scsi_xfer *xs;
int error;
+ bzero(buf, buflen);
+
if (sc_link->flags & SDEV_UMASS)
return (EJUSTRETURN);
@@ -824,8 +826,6 @@ scsi_inquire_vpd(struct scsi_link *sc_link, void *buf, u_int buflen,
cmd->pagecode = page;
_lto2b(buflen, cmd->length);
- bzero(buf, buflen);
-
error = scsi_xs_sync(xs);
scsi_xs_put(xs);