diff options
author | 2005-09-29 01:19:53 +0000 | |
---|---|---|
committer | 2005-09-29 01:19:53 +0000 | |
commit | e41e83b5e3e32b536a0492e0aabf81b2327ac76b (patch) | |
tree | 8c53c7b5b55a939fbc0293b022f1c00c86589020 | |
parent | sync (diff) | |
download | wireguard-openbsd-e41e83b5e3e32b536a0492e0aabf81b2327ac76b.tar.xz wireguard-openbsd-e41e83b5e3e32b536a0492e0aabf81b2327ac76b.zip |
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@
-rw-r--r-- | sys/scsi/cd.c | 4 |
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); |