mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-29 16:49:55 +00:00
Flush the cache on STOP UNIT (#644)
This commit is contained in:
parent
36cadd78fc
commit
9d0d78a643
@ -1293,8 +1293,12 @@ bool Disk::StartStop(const DWORD *cdb)
|
|||||||
SetStopped(!start);
|
SetStopped(!start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!start) {
|
||||||
|
// Flush the cache when stopping
|
||||||
|
disk.dcache->Save();
|
||||||
|
|
||||||
// Look at the eject bit and eject if necessary
|
// Look at the eject bit and eject if necessary
|
||||||
if (load && !start) {
|
if (load) {
|
||||||
if (IsLocked()) {
|
if (IsLocked()) {
|
||||||
// Cannot be ejected because it is locked
|
// Cannot be ejected because it is locked
|
||||||
SetStatusCode(STATUS_PREVENT);
|
SetStatusCode(STATUS_PREVENT);
|
||||||
@ -1304,6 +1308,7 @@ bool Disk::StartStop(const DWORD *cdb)
|
|||||||
// Eject
|
// Eject
|
||||||
return Eject(false);
|
return Eject(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user