mirror of
https://github.com/akuker/RASCSI.git
synced 2025-08-15 08:27:34 +00:00
Updated delegation for TEST UNIT READY and REZERO
This commit is contained in:
@@ -668,15 +668,7 @@ void SASIDEV::CmdTestUnitReady()
|
|||||||
LOGTRACE("%s TEST UNIT READY Command ", __PRETTY_FUNCTION__);
|
LOGTRACE("%s TEST UNIT READY Command ", __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
// Command processing on drive
|
// Command processing on drive
|
||||||
bool status = ((Disk *)ctrl.device)->TestUnitReady(ctrl.cmd);
|
ctrl.device->TestUnitReady(this);
|
||||||
if (!status) {
|
|
||||||
// Failure (Error)
|
|
||||||
Error();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// status phase
|
|
||||||
Status();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -689,15 +681,7 @@ void SASIDEV::CmdRezero()
|
|||||||
LOGTRACE( "%s REZERO UNIT Command ", __PRETTY_FUNCTION__);
|
LOGTRACE( "%s REZERO UNIT Command ", __PRETTY_FUNCTION__);
|
||||||
|
|
||||||
// Command processing on drive
|
// Command processing on drive
|
||||||
bool status = ctrl.device->Rezero(ctrl.cmd);
|
ctrl.device->Rezero(this);
|
||||||
if (!status) {
|
|
||||||
// Failure (Error)
|
|
||||||
Error();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// status phase
|
|
||||||
Status();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@@ -355,7 +355,7 @@ BOOL DiskTrack::Read(BYTE *buf, int sec) const
|
|||||||
|
|
||||||
void Disk::TestUnitReady(SASIDEV *controller)
|
void Disk::TestUnitReady(SASIDEV *controller)
|
||||||
{
|
{
|
||||||
bool status = TestUnitReady(ctrl->cmd);
|
bool status = CheckReady();
|
||||||
if (!status) {
|
if (!status) {
|
||||||
// Failure (Error)
|
// Failure (Error)
|
||||||
controller->Error();
|
controller->Error();
|
||||||
@@ -368,7 +368,7 @@ void Disk::TestUnitReady(SASIDEV *controller)
|
|||||||
|
|
||||||
void Disk::Rezero(SASIDEV *controller)
|
void Disk::Rezero(SASIDEV *controller)
|
||||||
{
|
{
|
||||||
bool status = Rezero(ctrl->cmd);
|
bool status = CheckReady();
|
||||||
if (!status) {
|
if (!status) {
|
||||||
// Failure (Error)
|
// Failure (Error)
|
||||||
controller->Error();
|
controller->Error();
|
||||||
@@ -1974,17 +1974,6 @@ bool Disk::TestUnitReady(const DWORD* /*cdb*/)
|
|||||||
return CheckReady();
|
return CheckReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// REZERO UNIT
|
|
||||||
//
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
bool Disk::Rezero(const DWORD* /*cdb*/)
|
|
||||||
{
|
|
||||||
// Status check
|
|
||||||
return CheckReady();
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// FORMAT UNIT
|
// FORMAT UNIT
|
||||||
|
@@ -227,9 +227,8 @@ public:
|
|||||||
void SetBlockCount(DWORD);
|
void SetBlockCount(DWORD);
|
||||||
bool GetStartAndCount(SASIDEV *, uint64_t&, uint32_t&, bool);
|
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
|
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 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 bool ModeSelect(const DWORD *cdb, const BYTE *buf, int length);// MODE SELECT command
|
||||||
virtual int ModeSense(const DWORD *cdb, BYTE *buf); // MODE SENSE command
|
virtual int ModeSense(const DWORD *cdb, BYTE *buf); // MODE SENSE command
|
||||||
|
Reference in New Issue
Block a user