Remove unused duplicate code dealing with MODE SELECT (#1268) (#1269)

* Remove unused code
This commit is contained in:
Uwe Seimet 2023-10-29 13:01:12 +01:00 committed by GitHub
parent 43088ab3bc
commit d6116bf5c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 13 deletions

View File

@ -691,7 +691,7 @@ bool ScsiController::XferOut(bool cont)
return device != nullptr ? device->WriteByteSequence(span(GetBuffer().data(), count)) : false;
}
void ScsiController::DataOutNonBlockOriented()
void ScsiController::DataOutNonBlockOriented() const
{
assert(IsDataOut());
@ -703,18 +703,8 @@ void ScsiController::DataOutNonBlockOriented()
case scsi_command::eCmdWriteLong16:
case scsi_command::eCmdVerify10:
case scsi_command::eCmdVerify16:
break;
case scsi_command::eCmdModeSelect6:
case scsi_command::eCmdModeSelect10: {
if (auto device = dynamic_pointer_cast<ModePageDevice>(GetDeviceForLun(GetEffectiveLun()));
device != nullptr) {
device->ModeSelect(GetOpcode(), GetCmd(), GetBuffer(), GetOffset());
}
else {
throw scsi_exception(sense_key::illegal_request, asc::invalid_command_operation_code);
}
}
case scsi_command::eCmdModeSelect10:
break;
case scsi_command::eCmdSetMcastAddr:

View File

@ -93,7 +93,7 @@ private:
bool XferOutBlockOriented(bool);
void ReceiveBytes();
void DataOutNonBlockOriented();
void DataOutNonBlockOriented() const;
void Receive();
// TODO Make non-virtual as soon as SysTimer calls do not segfault anymore on a regular PC, e.g. by using ifdef __arm__.