summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2002-12-12 18:09:35 +0000
committeryar <yar@FreeBSD.org>2002-12-12 18:09:35 +0000
commitff5e0540fc6dd9020dd8d22f458c92be7b211dee (patch)
tree3e72bf912559087d69d6d688f2a9f67d5720a629 /sys/cam
parent824369dc3ec54fe2a617a7d9ea776792c033ba85 (diff)
downloadFreeBSD-src-ff5e0540fc6dd9020dd8d22f458c92be7b211dee.zip
FreeBSD-src-ff5e0540fc6dd9020dd8d22f458c92be7b211dee.tar.gz
Clear the "device open" flag in daopen() before returning a error,
so the device won't stay marked as open whereas it isn't. Approved by: re, njl MFC after: 1 week
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_da.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 55fa578..90a885f 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -612,6 +612,7 @@ daopen(dev_t dev, int flags __unused, int fmt __unused, struct thread *td __unus
if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0)
daprevent(periph, PR_PREVENT);
} else {
+ softc->flags &= ~DA_FLAG_OPEN;
cam_periph_release(periph);
}
cam_periph_unlock(periph);
OpenPOWER on IntegriCloud