summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-09-29 01:19:54 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-09-29 01:19:54 +0000
commit1d53ea1a41da110fadb8fe6e91bd01652d5a0d69 (patch)
tree2d45b458d67b9b6f4fa5e5a9535bc35684ef71fd /sys
parentf557be28dddfe7e2ba761fc32ee2c90aff77d01f (diff)
Clear SDEV_MEDIA_LOADED for cd media on the last close of a device, as
sd does. Prevents spurious label information from being seen on devices that return NOT READY/UNABLE TO RECOVER TABLE-OF-CONTENTS error (or other sense errors) for blank media. Burning cd's still works. ok marco@ dlg@ fgsch@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/cd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 7084b78726b..a67b5eaa4bb 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.91 2005/09/26 22:52:49 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.92 2005/09/29 01:19:53 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -461,7 +461,7 @@ cdclose(dev, flag, fmt, p)
scsi_prevent(cd->sc_link, PR_ALLOW,
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
- cd->sc_link->flags &= ~SDEV_OPEN;
+ cd->sc_link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED);
if (cd->sc_link->flags & SDEV_EJECTING) {
scsi_start(cd->sc_link, SSS_STOP|SSS_LOEJ, 0);