From: krw Date: Sun, 25 Jul 2010 15:39:32 +0000 (+0000) Subject: Restore previous behaviour of always bzero()'ing the buf passed to X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=134bbb4934f43f7e0144bd4166a229455f23d87d;p=openbsd 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@. --- 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);