mirror of
https://github.com/akuker/RASCSI.git
synced 2025-04-06 22:37:17 +00:00
Error handling update
This commit is contained in:
parent
d3a9ae48af
commit
c5b7f2ffd4
@ -242,7 +242,15 @@ void SCSIDEV::Execute()
|
||||
ctrl.execstart = SysTimer::GetTimerLow();
|
||||
|
||||
ctrl.device = ctrl.unit[GetLun()];
|
||||
ctrl.device->Dispatch(this);
|
||||
|
||||
try {
|
||||
ctrl.device->Dispatch(this);
|
||||
}
|
||||
catch (const lun_exception& e) {
|
||||
LOGINFO("%s Invalid LUN %d", __PRETTY_FUNCTION__, e.getlun());
|
||||
|
||||
Error(ERROR_CODES::sense_key::ILLEGAL_REQUEST, ERROR_CODES::asc::INVALID_LUN);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1325,7 +1325,7 @@ void Disk::AddCommand(SCSIDEV::scsi_command opcode, const char* name, void (Disk
|
||||
commands[opcode] = new command_t(name, execute);
|
||||
}
|
||||
|
||||
bool Disk::Dispatch(SASIDEV *controller)
|
||||
bool Disk::Dispatch(SCSIDEV *controller)
|
||||
{
|
||||
SASIDEV::ctrl_t *ctrl = controller->GetWorkAddr();
|
||||
|
||||
|
@ -231,7 +231,7 @@ public:
|
||||
bool Format(const DWORD *cdb); // FORMAT UNIT command
|
||||
bool Reassign(const DWORD *cdb); // REASSIGN UNIT command
|
||||
|
||||
virtual bool Dispatch(SASIDEV *);
|
||||
virtual bool Dispatch(SCSIDEV *);
|
||||
|
||||
protected:
|
||||
// Internal processing
|
||||
|
@ -129,7 +129,7 @@ void SCSIDaynaPort::Open(const Filepath& path, BOOL attn)
|
||||
commands[opcode] = new command_t(name, execute);
|
||||
}
|
||||
|
||||
bool SCSIDaynaPort::Dispatch(SASIDEV *controller)
|
||||
bool SCSIDaynaPort::Dispatch(SCSIDEV *controller)
|
||||
{
|
||||
SASIDEV::ctrl_t *ctrl = controller->GetWorkAddr();
|
||||
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
void CmdEnableInterface(SASIDEV *);
|
||||
void CmdGetEventStatusNotification(SASIDEV *);
|
||||
|
||||
bool Dispatch(SASIDEV *);
|
||||
bool Dispatch(SCSIDEV *);
|
||||
|
||||
const int DAYNAPORT_BUFFER_SIZE = 0x1000000;
|
||||
|
||||
|
@ -271,7 +271,7 @@ void SCSICD::AddCommand(SCSIDEV::scsi_command opcode, const char* name, void (SC
|
||||
commands[opcode] = new command_t(name, execute);
|
||||
}
|
||||
|
||||
bool SCSICD::Dispatch(SASIDEV *controller)
|
||||
bool SCSICD::Dispatch(SCSIDEV *controller)
|
||||
{
|
||||
SASIDEV::ctrl_t *ctrl = controller->GetWorkAddr();
|
||||
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
void LBAtoMSF(DWORD lba, BYTE *msf) const; // LBA→MSF conversion
|
||||
DWORD MSFtoLBA(const BYTE *msf) const; // MSF→LBA conversion
|
||||
|
||||
bool Dispatch(SASIDEV *);
|
||||
bool Dispatch(SCSIDEV *);
|
||||
|
||||
private:
|
||||
// Open
|
||||
|
Loading…
x
Reference in New Issue
Block a user