summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2005-08-27 03:50:04 +0000
committerkrw <krw@openbsd.org>2005-08-27 03:50:04 +0000
commita3e8fdf56a1992a264bb92cdcfc171ac232690bb (patch)
tree7ebd19dd0d6198b36bbf74320a993be65a45c7fc
parentfix obvious accident introduced with r1.9, there is no disktype floppyx (diff)
downloadwireguard-openbsd-a3e8fdf56a1992a264bb92cdcfc171ac232690bb.tar.xz
wireguard-openbsd-a3e8fdf56a1992a264bb92cdcfc171ac232690bb.zip
Put in missing parenthesis and thus always pass
SCSI_IGNORE_ILLEGAL_REQUEST and SCSI_IGNORE_MEDIA_CHANGE flags to scsi_test_unit_ready() and scsi_start() during sdopen(). Re-enables use of devices that don't support START_STOP or TEST_UNIT_READY commands. Noted by and fix tested by Jason Crawford on VMWare disks. ok dlg@ henning@, supportive comments from miod@.
-rw-r--r--sys/scsi/sd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 985a34efecc..7e5d583f277 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.89 2005/08/24 01:19:47 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.90 2005/08/27 03:50:04 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -382,12 +382,12 @@ sdopen(dev, flag, fmt, p)
/* Check that it is still responding and ok. */
error = scsi_test_unit_ready(sc_link,
TEST_READY_RETRIES_DEFAULT,
- (part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0 |
+ ((part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0) |
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
/* Spin up the unit, ready or not. */
error = scsi_start(sc_link, SSS_START,
- (part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0 |
+ ((part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0) |
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
if (error) {