Added command byte count to SCSI command mapping (#966)

* Extended mapping table with command byte count

* Terminate early if command is unknown
This commit is contained in:
Uwe Seimet
2022-11-06 19:44:44 +01:00
committed by GitHub
parent c98c52ffb8
commit 1cae530d42
10 changed files with 121 additions and 101 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ void PrimaryDevice::AddCommand(scsi_command opcode, const operation& execute)
void PrimaryDevice::Dispatch(scsi_command cmd)
{
if (const auto& it = commands.find(cmd); it != commands.end()) {
LOGDEBUG("Executing %s ($%02X)", command_names.find(cmd)->second, static_cast<int>(cmd))
LOGDEBUG("Executing %s ($%02X)", command_mapping.find(cmd)->second.second, static_cast<int>(cmd))
it->second();
}