Moved code in order to fix TODOs

This commit is contained in:
Uwe Seimet 2021-08-23 16:19:46 +02:00
parent 7a1ab5bdb7
commit 5661330173
2 changed files with 4 additions and 10 deletions

View File

@ -701,13 +701,7 @@ void SASIDEV::CmdRequestSense()
}
// Command processing on drive
ctrl.length = ctrl.unit[lun]->RequestSense(ctrl.cmd, ctrl.buffer);
ASSERT(ctrl.length > 0);
LOGTRACE("%s Sense Key $%02X, ASC $%02X",__PRETTY_FUNCTION__, ctrl.buffer[2], ctrl.buffer[12]);
// Read phase
DataIn();
ctrl.unit[lun]->RequestSense(this);
}
//---------------------------------------------------------------------------

View File

@ -227,10 +227,8 @@ public:
void SetBlockCount(DWORD);
bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool);
// TODO Try to get rid of these methods, which are called by SASIDEV (but should not)
virtual int RequestSense(const DWORD *cdb, BYTE *buf); // REQUEST SENSE command
// TODO Try to get rid of this method, which is called by SASIDEV (but must not)
virtual bool ModeSelect(const DWORD *cdb, const BYTE *buf, int length);// MODE SELECT command
bool Format(const DWORD *cdb); // FORMAT UNIT command
virtual bool Dispatch(SCSIDEV *);
@ -245,10 +243,12 @@ protected:
int AddCDDA(bool, BYTE *buf); // Add CD_DA
virtual int AddVendor(int page, bool change, BYTE *buf); // Add vendor special info
bool CheckReady(); // Check if ready
virtual int RequestSense(const DWORD *cdb, BYTE *buf); // REQUEST SENSE command
// Internal data
disk_t disk; // Internal disk data
private:
bool Format(const DWORD *cdb); // FORMAT UNIT command
int ModeSense(const DWORD *cdb, BYTE *buf); // MODE SENSE command
};