summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2004-05-07 22:56:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2004-05-07 22:56:20 +0000
commitea27d87d8ee93c3c1ff9478894f3cd73debcb1d8 (patch)
treef91e459da3d8c338dcb27d284f6817c589485f2e /sys/scsi
parent9963c9d464c55c527b9a5b64ee6621d9a546df87 (diff)
Set value for rslt before trying to display it. 'Bad LUN ...' messsage
will now display correct error value. Spotted in SCSIDEBUG output from Adrian Close's bizarre USB device. ok millert@ deraadt@ marco@.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsiconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 74597aa8354..b28db536476 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.89 2004/05/07 18:13:31 miod Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.90 2004/05/07 22:56:19 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -671,7 +671,8 @@ scsi_probedev(scsi, inqbuflun0, target, lun)
#endif /* SCSI_2_DEF */
/* Now go ask the device all about itself. */
- if (scsi_inquire(sc_link, &inqbuf, scsi_autoconf | SCSI_SILENT) != 0) {
+ rslt = scsi_inquire(sc_link, &inqbuf, scsi_autoconf | SCSI_SILENT);
+ if (rslt != 0) {
SC_DEBUG(sc_link, SDEV_DB2, ("Bad LUN. rslt = %i\n", rslt));
if (lun == 0)
rslt = EINVAL;