mirror of
https://github.com/akuker/RASCSI.git
synced 2025-04-04 09:29:39 +00:00
Removed dummy implementations of unsupported commands from scsicd
This commit is contained in:
parent
22fd98167a
commit
e05d6a245a
@ -1086,40 +1086,40 @@ Disk::Disk(const std::string id) : BlockDevice(id)
|
||||
disk.dcache = NULL;
|
||||
disk.imgoffset = 0;
|
||||
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "CmdTestUnitReady", &Disk::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRezero, "CmdRezero", &Disk::Rezero);
|
||||
AddCommand(SCSIDEV::eCmdRequestSense, "CmdRequestSense", &Disk::RequestSense);
|
||||
AddCommand(SCSIDEV::eCmdFormat, "CmdFormat", &Disk::FormatUnit);
|
||||
AddCommand(SCSIDEV::eCmdReassign, "CmdReassign", &Disk::ReassignBlocks);
|
||||
AddCommand(SCSIDEV::eCmdRead6, "CmdRead6", &Disk::Read6);
|
||||
AddCommand(SCSIDEV::eCmdWrite6, "CmdWrite6", &Disk::Write6);
|
||||
AddCommand(SCSIDEV::eCmdSeek6, "CmdSeek6", &Disk::Seek6);
|
||||
AddCommand(SCSIDEV::eCmdInquiry, "CmdInquiry", &Disk::Inquiry);
|
||||
AddCommand(SCSIDEV::eCmdModeSelect, "CmdModeSelect", &Disk::ModeSelect);
|
||||
AddCommand(SCSIDEV::eCmdReserve6, "CmdReserve6", &Disk::Reserve6);
|
||||
AddCommand(SCSIDEV::eCmdRelease6, "CmdRelease6", &Disk::Release6);
|
||||
AddCommand(SCSIDEV::eCmdModeSense, "CmdModeSense", &Disk::ModeSense);
|
||||
AddCommand(SCSIDEV::eCmdStartStop, "CmdStartStop", &Disk::StartStopUnit);
|
||||
AddCommand(SCSIDEV::eCmdSendDiag, "CmdSendDiag", &Disk::SendDiagnostic);
|
||||
AddCommand(SCSIDEV::eCmdRemoval, "CmdRemoval", &Disk::PreventAllowRemoval);
|
||||
AddCommand(SCSIDEV::eCmdReadCapacity10, "CmdReadCapacity10", &Disk::ReadCapacity10);
|
||||
AddCommand(SCSIDEV::eCmdRead10, "CmdRead10", &Disk::Read10);
|
||||
AddCommand(SCSIDEV::eCmdWrite10, "CmdWrite10", &Disk::Write10);
|
||||
AddCommand(SCSIDEV::eCmdVerify10, "CmdVerify10", &Disk::Write10);
|
||||
AddCommand(SCSIDEV::eCmdSeek10, "CmdSeek10", &Disk::Seek10);
|
||||
AddCommand(SCSIDEV::eCmdVerify10, "CmdVerify10", &Disk::Verify10);
|
||||
AddCommand(SCSIDEV::eCmdSynchronizeCache10, "CmdSynchronizeCache10", &Disk::SynchronizeCache10);
|
||||
AddCommand(SCSIDEV::eCmdSynchronizeCache16, "CmdSynchronizeCache16", &Disk::SynchronizeCache16);
|
||||
AddCommand(SCSIDEV::eCmdReadDefectData10, "CmdReadDefectData10", &Disk::ReadDefectData10);
|
||||
AddCommand(SCSIDEV::eCmdModeSelect10, "CmdModeSelect10", &Disk::ModeSelect10);
|
||||
AddCommand(SCSIDEV::eCmdReserve10, "CmdReserve10", &Disk::Reserve10);
|
||||
AddCommand(SCSIDEV::eCmdRelease10, "CmdRelease10", &Disk::Release10);
|
||||
AddCommand(SCSIDEV::eCmdModeSense10, "CmdModeSense10", &Disk::ModeSense10);
|
||||
AddCommand(SCSIDEV::eCmdRead16, "CmdRead16", &Disk::Read16);
|
||||
AddCommand(SCSIDEV::eCmdWrite16, "CmdWrite16", &Disk::Write16);
|
||||
AddCommand(SCSIDEV::eCmdVerify16, "CmdVerify16", &Disk::Verify16);
|
||||
AddCommand(SCSIDEV::eCmdReadCapacity16, "CmdReadCapacity16", &Disk::ReadCapacity16);
|
||||
AddCommand(SCSIDEV::eCmdReportLuns, "CmdReportLuns", &Disk::ReportLuns);
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "TestUnitReady", &Disk::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRezero, "Rezero", &Disk::Rezero);
|
||||
AddCommand(SCSIDEV::eCmdRequestSense, "RequestSense", &Disk::RequestSense);
|
||||
AddCommand(SCSIDEV::eCmdFormat, "Format", &Disk::FormatUnit);
|
||||
AddCommand(SCSIDEV::eCmdReassign, "Reassign", &Disk::ReassignBlocks);
|
||||
AddCommand(SCSIDEV::eCmdRead6, "Read6", &Disk::Read6);
|
||||
AddCommand(SCSIDEV::eCmdWrite6, "Write6", &Disk::Write6);
|
||||
AddCommand(SCSIDEV::eCmdSeek6, "Seek6", &Disk::Seek6);
|
||||
AddCommand(SCSIDEV::eCmdInquiry, "Inquiry", &Disk::Inquiry);
|
||||
AddCommand(SCSIDEV::eCmdModeSelect, "ModeSelect", &Disk::ModeSelect);
|
||||
AddCommand(SCSIDEV::eCmdReserve6, "Reserve6", &Disk::Reserve6);
|
||||
AddCommand(SCSIDEV::eCmdRelease6, "Release6", &Disk::Release6);
|
||||
AddCommand(SCSIDEV::eCmdModeSense, "ModeSense", &Disk::ModeSense);
|
||||
AddCommand(SCSIDEV::eCmdStartStop, "StartStop", &Disk::StartStopUnit);
|
||||
AddCommand(SCSIDEV::eCmdSendDiag, "SendDiag", &Disk::SendDiagnostic);
|
||||
AddCommand(SCSIDEV::eCmdRemoval, "Removal", &Disk::PreventAllowRemoval);
|
||||
AddCommand(SCSIDEV::eCmdReadCapacity10, "ReadCapacity10", &Disk::ReadCapacity10);
|
||||
AddCommand(SCSIDEV::eCmdRead10, "Read10", &Disk::Read10);
|
||||
AddCommand(SCSIDEV::eCmdWrite10, "Write10", &Disk::Write10);
|
||||
AddCommand(SCSIDEV::eCmdVerify10, "Verify10", &Disk::Write10);
|
||||
AddCommand(SCSIDEV::eCmdSeek10, "Seek10", &Disk::Seek10);
|
||||
AddCommand(SCSIDEV::eCmdVerify10, "Verify10", &Disk::Verify10);
|
||||
AddCommand(SCSIDEV::eCmdSynchronizeCache10, "SynchronizeCache10", &Disk::SynchronizeCache10);
|
||||
AddCommand(SCSIDEV::eCmdSynchronizeCache16, "SynchronizeCache16", &Disk::SynchronizeCache16);
|
||||
AddCommand(SCSIDEV::eCmdReadDefectData10, "ReadDefectData10", &Disk::ReadDefectData10);
|
||||
AddCommand(SCSIDEV::eCmdModeSelect10, "ModeSelect10", &Disk::ModeSelect10);
|
||||
AddCommand(SCSIDEV::eCmdReserve10, "Reserve10", &Disk::Reserve10);
|
||||
AddCommand(SCSIDEV::eCmdRelease10, "Release10", &Disk::Release10);
|
||||
AddCommand(SCSIDEV::eCmdModeSense10, "ModeSense10", &Disk::ModeSense10);
|
||||
AddCommand(SCSIDEV::eCmdRead16, "Read16", &Disk::Read16);
|
||||
AddCommand(SCSIDEV::eCmdWrite16, "Write16", &Disk::Write16);
|
||||
AddCommand(SCSIDEV::eCmdVerify16, "Verify16", &Disk::Verify16);
|
||||
AddCommand(SCSIDEV::eCmdReadCapacity16, "ReadCapacity16", &Disk::ReadCapacity16);
|
||||
AddCommand(SCSIDEV::eCmdReportLuns, "ReportLuns", &Disk::ReportLuns);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -2333,67 +2333,6 @@ void Disk::Release10(SASIDEV *controller)
|
||||
controller->Status();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// READ TOC
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
int Disk::ReadToc(const DWORD *cdb, BYTE *buf)
|
||||
{
|
||||
ASSERT(cdb);
|
||||
ASSERT(cdb[0] == 0x43);
|
||||
ASSERT(buf);
|
||||
|
||||
// This command is not supported
|
||||
SetStatusCode(STATUS_INVALIDCMD);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PLAY AUDIO
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
bool Disk::PlayAudio(const DWORD *cdb)
|
||||
{
|
||||
ASSERT(cdb);
|
||||
ASSERT(cdb[0] == 0x45);
|
||||
|
||||
// This command is not supported
|
||||
SetStatusCode(STATUS_INVALIDCMD);
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PLAY AUDIO MSF
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
bool Disk::PlayAudioMSF(const DWORD *cdb)
|
||||
{
|
||||
ASSERT(cdb);
|
||||
ASSERT(cdb[0] == 0x47);
|
||||
|
||||
// This command is not supported
|
||||
SetStatusCode(STATUS_INVALIDCMD);
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// PLAY AUDIO TRACK
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
bool Disk::PlayAudioTrack(const DWORD *cdb)
|
||||
{
|
||||
ASSERT(cdb);
|
||||
ASSERT(cdb[0] == 0x48);
|
||||
|
||||
// This command is not supported
|
||||
SetStatusCode(STATUS_INVALIDCMD);
|
||||
return false;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Get start sector and sector count for a READ/WRITE(10/16) operation
|
||||
|
@ -209,10 +209,6 @@ public:
|
||||
bool StartStop(const DWORD *cdb); // START STOP UNIT command
|
||||
bool SendDiag(const DWORD *cdb); // SEND DIAGNOSTIC command
|
||||
bool Removal(const DWORD *cdb); // PREVENT/ALLOW MEDIUM REMOVAL command
|
||||
virtual int ReadToc(const DWORD *cdb, BYTE *buf); // READ TOC command
|
||||
virtual bool PlayAudio(const DWORD *cdb); // PLAY AUDIO command
|
||||
virtual bool PlayAudioMSF(const DWORD *cdb); // PLAY AUDIO MSF command
|
||||
virtual bool PlayAudioTrack(const DWORD *cdb); // PLAY AUDIO TRACK command
|
||||
|
||||
virtual int Read(const DWORD *cdb, BYTE *buf, uint64_t block);
|
||||
virtual int ModeSense10(const DWORD *cdb, BYTE *buf); // MODE SENSE(10) command
|
||||
|
@ -85,13 +85,13 @@ SCSIDaynaPort::SCSIDaynaPort() : Disk("SCDP")
|
||||
|
||||
#endif // linux
|
||||
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "CmdTestUnitReady", &SCSIDaynaPort::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRead6, "CmdRead6", &SCSIDaynaPort::Read6);
|
||||
AddCommand(SCSIDEV::eCmdWrite6, "CmdWrite6", &SCSIDaynaPort::Write6);
|
||||
AddCommand(SCSIDEV::eCmdRetrieveStats, "CmdRetrieveStats", &SCSIDaynaPort::RetrieveStatistics);
|
||||
AddCommand(SCSIDEV::eCmdSetIfaceMode, "CmdSetIfaceMode", &SCSIDaynaPort::SetInterfaceMode);
|
||||
AddCommand(SCSIDEV::eCmdSetMcastAddr, "CmdSetMcastAddr", &SCSIDaynaPort::SetMcastAddr);
|
||||
AddCommand(SCSIDEV::eCmdEnableInterface, "CmdEnableInterface", &SCSIDaynaPort::EnableInterface);
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "TestUnitReady", &SCSIDaynaPort::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRead6, "Read6", &SCSIDaynaPort::Read6);
|
||||
AddCommand(SCSIDEV::eCmdWrite6, "Write6", &SCSIDaynaPort::Write6);
|
||||
AddCommand(SCSIDEV::eCmdRetrieveStats, "RetrieveStats", &SCSIDaynaPort::RetrieveStatistics);
|
||||
AddCommand(SCSIDEV::eCmdSetIfaceMode, "SetIfaceMode", &SCSIDaynaPort::SetInterfaceMode);
|
||||
AddCommand(SCSIDEV::eCmdSetMcastAddr, "SetMcastAddr", &SCSIDaynaPort::SetMcastAddr);
|
||||
AddCommand(SCSIDEV::eCmdEnableInterface, "EnableInterface", &SCSIDaynaPort::EnableInterface);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -63,9 +63,9 @@ SCSIBR::SCSIBR() : Disk("SCBR")
|
||||
fs = new CFileSys();
|
||||
fs->Reset();
|
||||
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "CmdTestUnitReady", &SCSIBR::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRead6, "CmdGetMessage10", &SCSIBR::GetMessage10);
|
||||
AddCommand(SCSIDEV::eCmdWrite6, "CmdSendMessage10", &SCSIBR::SendMessage10);
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "TestUnitReady", &SCSIBR::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRead6, "GetMessage10", &SCSIBR::GetMessage10);
|
||||
AddCommand(SCSIDEV::eCmdWrite6, "SendMessage10", &SCSIBR::SendMessage10);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -245,11 +245,8 @@ SCSICD::SCSICD() : Disk("SCCD")
|
||||
dataindex = -1;
|
||||
audioindex = -1;
|
||||
|
||||
AddCommand(SCSIDEV::eCmdReadToc, "CmdReadToc", &SCSICD::CmdReadToc);
|
||||
AddCommand(SCSIDEV::eCmdPlayAudio10, "CmdPlayAudio10", &SCSICD::CmdPlayAudio10);
|
||||
AddCommand(SCSIDEV::eCmdPlayAudioMSF, "CmdPlayAudioMSF", &SCSICD::CmdPlayAudioMSF);
|
||||
AddCommand(SCSIDEV::eCmdPlayAudioTrack, "CmdPlayAudioTrack", &SCSICD::CmdPlayAudioTrack);
|
||||
AddCommand(SCSIDEV::eCmdGetEventStatusNotification, "CmdGetEventStatusNotification", &SCSICD::CmdGetEventStatusNotification);
|
||||
AddCommand(SCSIDEV::eCmdReadToc, "ReadToc", &SCSICD::ReadToc);
|
||||
AddCommand(SCSIDEV::eCmdGetEventStatusNotification, "GetEventStatusNotification", &SCSICD::GetEventStatusNotification);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@ -504,7 +501,7 @@ void SCSICD::OpenPhysical(const Filepath& path)
|
||||
dataindex = 0;
|
||||
}
|
||||
|
||||
void SCSICD::CmdReadToc(SASIDEV *controller)
|
||||
void SCSICD::ReadToc(SASIDEV *controller)
|
||||
{
|
||||
ctrl->length = ReadToc(ctrl->cmd, ctrl->buffer);
|
||||
if (ctrl->length <= 0) {
|
||||
@ -516,45 +513,6 @@ void SCSICD::CmdReadToc(SASIDEV *controller)
|
||||
controller->DataIn();
|
||||
}
|
||||
|
||||
void SCSICD::CmdPlayAudio10(SASIDEV *controller)
|
||||
{
|
||||
// Command processing on drive
|
||||
bool status = PlayAudio(ctrl->cmd);
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
controller->Error();
|
||||
return;
|
||||
}
|
||||
|
||||
controller->Status();
|
||||
}
|
||||
|
||||
void SCSICD::CmdPlayAudioMSF(SASIDEV *controller)
|
||||
{
|
||||
// Command processing on drive
|
||||
bool status = PlayAudioMSF(ctrl->cmd);
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
controller->Error();
|
||||
return;
|
||||
}
|
||||
|
||||
controller->Status();
|
||||
}
|
||||
|
||||
void SCSICD::CmdPlayAudioTrack(SASIDEV *controller)
|
||||
{
|
||||
// Command processing on drive
|
||||
bool status = PlayAudioTrack(ctrl->cmd);
|
||||
if (!status) {
|
||||
// Failure (Error)
|
||||
controller->Error();
|
||||
return;
|
||||
}
|
||||
|
||||
controller->Status();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// INQUIRY
|
||||
@ -788,7 +746,7 @@ int SCSICD::ReadToc(const DWORD *cdb, BYTE *buf)
|
||||
return length;
|
||||
}
|
||||
|
||||
void SCSICD::CmdGetEventStatusNotification(SASIDEV *controller)
|
||||
void SCSICD::GetEventStatusNotification(SASIDEV *controller)
|
||||
{
|
||||
// This naive (but legal) implementation avoids constant warnings in the logs
|
||||
controller->Error(ERROR_CODES::sense_key::ILLEGAL_REQUEST, ERROR_CODES::asc::INVALID_FIELD_IN_CDB);
|
||||
|
@ -107,11 +107,8 @@ private:
|
||||
void OpenIso(const Filepath& path); // Open(ISO)
|
||||
void OpenPhysical(const Filepath& path); // Open(Physical)
|
||||
|
||||
void CmdReadToc(SASIDEV *);
|
||||
void CmdPlayAudio10(SASIDEV *);
|
||||
void CmdPlayAudioMSF(SASIDEV *);
|
||||
void CmdPlayAudioTrack(SASIDEV *);
|
||||
void CmdGetEventStatusNotification(SASIDEV *);
|
||||
void ReadToc(SASIDEV *);
|
||||
void GetEventStatusNotification(SASIDEV *);
|
||||
|
||||
// LBA-MSF変換
|
||||
void LBAtoMSF(DWORD lba, BYTE *msf) const; // LBA→MSF conversion
|
||||
|
Loading…
x
Reference in New Issue
Block a user