| 63 | } |
| 64 | |
| 65 | void Disk::Dispatch(scsi_command cmd) |
| 66 | { |
| 67 | // Media changes must be reported on the next access, i.e. not only for TEST UNIT READY |
| 68 | if (IsMediumChanged()) { |
| 69 | assert(IsRemovable()); |
| 70 | |
| 71 | SetMediumChanged(false); |
| 72 | |
| 73 | GetController()->Error(sense_key::unit_attention, asc::not_ready_to_ready_change); |
| 74 | } |
| 75 | else { |
| 76 | PrimaryDevice::Dispatch(cmd); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | void Disk::SetUpCache(off_t image_offset, bool raw) |
| 81 | { |