mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-11 09:29:53 +00:00
Updated delegation for FORMAT
This commit is contained in:
parent
a79fdc0f67
commit
1929b092fe
@ -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);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 *);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user