mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-23 08:31:05 +00:00
Do not consider NONE operation an error (#369)
* Do not consider NONE operation an error * Cleanup * Code cleanup from other PR
This commit is contained in:
parent
34befb9fad
commit
dcbee64750
@ -356,7 +356,7 @@ void SASIDEV::Execute()
|
|||||||
ctrl.execstart = SysTimer::GetTimerLow();
|
ctrl.execstart = SysTimer::GetTimerLow();
|
||||||
|
|
||||||
// Discard pending sense data from the previous command if the current command is not REQUEST SENSE
|
// Discard pending sense data from the previous command if the current command is not REQUEST SENSE
|
||||||
if(SASIDEV::eCmdRequestSense != (SASIDEV::sasi_command)ctrl.cmd[0]) {
|
if ((SASIDEV::sasi_command)ctrl.cmd[0] != SASIDEV::eCmdRequestSense) {
|
||||||
ctrl.status = 0;
|
ctrl.status = 0;
|
||||||
ctrl.device->SetStatusCode(0);
|
ctrl.device->SetStatusCode(0);
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,7 @@ void SCSIDEV::Execute()
|
|||||||
|
|
||||||
ctrl.device = ctrl.unit[lun];
|
ctrl.device = ctrl.unit[lun];
|
||||||
|
|
||||||
// Discard pending sense data from the previous command
|
// Discard pending sense data from the previous command if the current command is not REQUEST SENSE
|
||||||
if ((SCSIDEV::scsi_command)ctrl.cmd[0] != eCmdRequestSense) {
|
if ((SCSIDEV::scsi_command)ctrl.cmd[0] != eCmdRequestSense) {
|
||||||
ctrl.device->SetStatusCode(0);
|
ctrl.device->SetStatusCode(0);
|
||||||
}
|
}
|
||||||
|
@ -959,6 +959,11 @@ bool ProcessCmd(int fd, const PbDeviceDefinition& pb_device, const PbCommand& co
|
|||||||
assert(dryRun);
|
assert(dryRun);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NONE:
|
||||||
|
// Do nothing, just log
|
||||||
|
LOGTRACE("Received %s command", PbOperation_Name(operation).c_str());
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ReturnStatus(fd, false, "Unknown operation");
|
return ReturnStatus(fd, false, "Unknown operation");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user