scsihd: Add PREVENT_ALLOW_MEDIUM_REMOVAL.
Like scsicdrom has.
This commit is contained in:
parent
4be6bad526
commit
cefe8698da
|
@ -116,6 +116,10 @@ void ScsiHardDisk::process_command() {
|
|||
case ScsiCommand::SEND_DIAGS:
|
||||
this->illegal_command(cmd);
|
||||
break;
|
||||
case ScsiCommand::PREVENT_ALLOW_MEDIUM_REMOVAL:
|
||||
this->eject_allowed = (cmd[4] & 1) == 0;
|
||||
this->switch_phase(ScsiPhase::STATUS);
|
||||
break;
|
||||
case ScsiCommand::READ_CAPACITY_10:
|
||||
this->read_capacity_10();
|
||||
break;
|
||||
|
|
|
@ -63,6 +63,7 @@ private:
|
|||
int total_blocks;
|
||||
uint64_t file_offset = 0;
|
||||
static const int sector_size = 512;
|
||||
bool eject_allowed = true;
|
||||
int bytes_out = 0;
|
||||
|
||||
uint8_t data_buf[1 << 21]; // TODO: add proper buffer management!
|
||||
|
|
Loading…
Reference in New Issue