mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Updated delegation for TEST UNIT READY and REZERO
This commit is contained in:
parent
bc0f419530
commit
a79fdc0f67
@ -668,15 +668,7 @@ void SASIDEV::CmdTestUnitReady()
|
||||
LOGTRACE("%s TEST UNIT READY Command ", __PRETTY_FUNCTION__);
|
||||
|
||||
// Command processing on drive
|
||||
bool status = ((Disk *)ctrl.device)->TestUnitReady(ctrl.cmd);
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
Error();
|
||||
return;
|
||||
}
|
||||
|
||||
// status phase
|
||||
Status();
|
||||
ctrl.device->TestUnitReady(this);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -689,15 +681,7 @@ void SASIDEV::CmdRezero()
|
||||
LOGTRACE( "%s REZERO UNIT Command ", __PRETTY_FUNCTION__);
|
||||
|
||||
// Command processing on drive
|
||||
bool status = ctrl.device->Rezero(ctrl.cmd);
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
Error();
|
||||
return;
|
||||
}
|
||||
|
||||
// status phase
|
||||
Status();
|
||||
ctrl.device->Rezero(this);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -355,7 +355,7 @@ BOOL DiskTrack::Read(BYTE *buf, int sec) const
|
||||
|
||||
void Disk::TestUnitReady(SASIDEV *controller)
|
||||
{
|
||||
bool status = TestUnitReady(ctrl->cmd);
|
||||
bool status = CheckReady();
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
controller->Error();
|
||||
@ -368,7 +368,7 @@ void Disk::TestUnitReady(SASIDEV *controller)
|
||||
|
||||
void Disk::Rezero(SASIDEV *controller)
|
||||
{
|
||||
bool status = Rezero(ctrl->cmd);
|
||||
bool status = CheckReady();
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
controller->Error();
|
||||
@ -1974,17 +1974,6 @@ bool Disk::TestUnitReady(const DWORD* /*cdb*/)
|
||||
return CheckReady();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// REZERO UNIT
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
bool Disk::Rezero(const DWORD* /*cdb*/)
|
||||
{
|
||||
// Status check
|
||||
return CheckReady();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// FORMAT UNIT
|
||||
|
@ -227,9 +227,8 @@ public:
|
||||
void SetBlockCount(DWORD);
|
||||
bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool);
|
||||
|
||||
// TODO Try to get rid of these methods, which are currently used by SASIDEV
|
||||
// TODO Try to get rid of these methods
|
||||
virtual bool TestUnitReady(const DWORD *cdb); // TEST UNIT READY command
|
||||
bool Rezero(const DWORD *cdb); // REZERO command
|
||||
virtual int RequestSense(const DWORD *cdb, BYTE *buf); // REQUEST SENSE command
|
||||
virtual bool ModeSelect(const DWORD *cdb, const BYTE *buf, int length);// MODE SELECT command
|
||||
virtual int ModeSense(const DWORD *cdb, BYTE *buf); // MODE SENSE command
|
||||
|
Loading…
x
Reference in New Issue
Block a user