diff options
author | sos <sos@FreeBSD.org> | 2000-01-28 22:17:29 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2000-01-28 22:17:29 +0000 |
commit | 8f80ebe2c0bafb93691b9aeaa715ac96d90cfa6a (patch) | |
tree | 0fa5a0b79b1f146431932c9b1fb057748e241488 /sys/dev | |
parent | 13ebb10b6056685e97648803344674ad81500162 (diff) | |
download | FreeBSD-src-8f80ebe2c0bafb93691b9aeaa715ac96d90cfa6a.zip FreeBSD-src-8f80ebe2c0bafb93691b9aeaa715ac96d90cfa6a.tar.gz |
Get the MEDIA_CHANGED status right here too.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 07578a4..4f470b8 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -243,15 +243,17 @@ astopen(dev_t dev, int32_t flags, int32_t fmt, struct proc *p) if (stp->flags == F_OPEN) return EBUSY; + atapi_test_ready(stp->atp); + if (stp->cap.lock) ast_prevent_allow(stp, 1); if (ast_sense(stp)) printf("ast%d: sense media type failed\n", stp->lun); - + + stp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED; stp->flags &= ~(F_DATA_WRITTEN | F_FM_WRITTEN); stp->flags |= F_OPEN; - stp->atp->flags &= ~ATAPI_F_MEDIA_CHANGED; ast_total = 0; return 0; } |