From 134bbb4934f43f7e0144bd4166a229455f23d87d Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 25 Jul 2010 15:39:32 +0000 Subject: [PATCH] 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@. --- sys/scsi/scsi_base.c | 6 +++--- 1 file 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); -- 2.20.1