mirror of
https://github.com/akuker/RASCSI.git
synced 2024-11-18 21:07:52 +00:00
Updated SASI LUN check
This commit is contained in:
parent
9502901978
commit
ae458c8988
@ -355,7 +355,14 @@ void SASIDEV::Execute()
|
||||
ctrl.blocks = 1;
|
||||
ctrl.execstart = SysTimer::GetTimerLow();
|
||||
|
||||
ctrl.device = ctrl.unit[GetEffectiveLun()];
|
||||
int lun = GetEffectiveLun();
|
||||
if (!ctrl.unit[lun]) {
|
||||
ctrl.device->SetStatusCode(STATUS_INVALIDLUN);
|
||||
Error(sense_key::ILLEGAL_REQUEST, asc::INVALID_LUN);
|
||||
return;
|
||||
}
|
||||
|
||||
ctrl.device = ctrl.unit[lun];
|
||||
ctrl.device->SetCtrl(&ctrl);
|
||||
|
||||
// Discard pending sense data from the previous command if the current command is not REQUEST SENSE
|
||||
|
Loading…
Reference in New Issue
Block a user