Updated delegation for FORMAT

This commit is contained in:
Uwe Seimet 2021-08-23 12:43:50 +02:00
parent a79fdc0f67
commit 1929b092fe
4 changed files with 6 additions and 35 deletions

View File

@ -390,7 +390,7 @@ void SASIDEV::Execute()
// REASSIGN BLOCKS
case SASIDEV::eCmdReassign:
CmdReassign();
CmdReassignBlocks();
return;
// READ(6)
@ -720,15 +720,7 @@ void SASIDEV::CmdFormat()
LOGTRACE( "%s FORMAT UNIT Command ", __PRETTY_FUNCTION__);
// Command processing on drive
bool status = ctrl.device->Format(ctrl.cmd);
if (!status) {
// Failure (Error)
Error();
return;
}
// status phase
Status();
ctrl.device->Format(this);
}
//---------------------------------------------------------------------------
@ -736,20 +728,12 @@ void SASIDEV::CmdFormat()
// REASSIGN BLOCKS
//
//---------------------------------------------------------------------------
void SASIDEV::CmdReassign()
void SASIDEV::CmdReassignBlocks()
{
LOGTRACE("%s REASSIGN BLOCKS Command ", __PRETTY_FUNCTION__);
// Command processing on drive
bool status = ctrl.device->Reassign(ctrl.cmd);
if (!status) {
// Failure (Error)
Error();
return;
}
// status phase
Status();
ctrl.device->ReassignBlocks(this);
}
//---------------------------------------------------------------------------

View File

@ -177,7 +177,7 @@ protected:
void CmdRezero(); // REZERO UNIT command
void CmdRequestSense(); // REQUEST SENSE command
void CmdFormat(); // FORMAT command
void CmdReassign(); // REASSIGN BLOCKS command
void CmdReassignBlocks(); // REASSIGN BLOCKS command
void CmdReserveUnit(); // RESERVE UNIT command
void CmdReleaseUnit(); // RELEASE UNIT command
void CmdRead6(); // READ(6) command

View File

@ -417,7 +417,7 @@ void Disk::Format(SASIDEV *controller)
void Disk::ReassignBlocks(SASIDEV *controller)
{
bool status = Reassign(ctrl->cmd);
bool status = CheckReady();
if (!status) {
// Failure (Error)
controller->Error();
@ -1997,17 +1997,6 @@ bool Disk::Format(const DWORD *cdb)
return true;
}
//---------------------------------------------------------------------------
//
// REASSIGN BLOCKS
//
//---------------------------------------------------------------------------
bool Disk::Reassign(const DWORD* /*cdb*/)
{
// Status check
return CheckReady();
}
//---------------------------------------------------------------------------
//
// READ

View File

@ -173,7 +173,6 @@ public:
void ModeSense10(SASIDEV *);
void Rezero(SASIDEV *);
void Format(SASIDEV *) override;
void Reassign(SASIDEV *);
void ReassignBlocks(SASIDEV *);
void StartStopUnit(SASIDEV *);
void SendDiagnostic(SASIDEV *);
@ -233,7 +232,6 @@ public:
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
bool Format(const DWORD *cdb); // FORMAT UNIT command
bool Reassign(const DWORD *cdb); // REASSIGN UNIT command
virtual bool Dispatch(SCSIDEV *);