Renamed SCSI command interface classes

This commit is contained in:
Uwe Seimet 2021-08-26 10:39:28 +02:00
parent 83c47adaf9
commit e63572488c
7 changed files with 21 additions and 21 deletions

View File

@ -36,7 +36,7 @@
// Constructor
//
//---------------------------------------------------------------------------
Disk::Disk(const std::string id) : Device(id), PrimaryDevice(), BlockDevice()
Disk::Disk(const std::string id) : Device(id), ScsiPrimaryCommands(), ScsiBlockCommands()
{
// Work initialization
configured_sector_size = 0;
@ -394,7 +394,7 @@ void Disk::Inquiry(SASIDEV *controller)
// Find a valid unit
// TODO The code below is probably wrong. It results in the same INQUIRY data being
// used for all LUNs, even though each LUN has its individual set of INQUIRY data.
PrimaryDevice *device = NULL;
ScsiPrimaryCommands *device = NULL;
for (int valid_lun = 0; valid_lun < SASIDEV::UnitMax; valid_lun++) {
if (ctrl->unit[valid_lun]) {
device = ctrl->unit[valid_lun];

View File

@ -21,8 +21,6 @@
#include "log.h"
#include "scsi.h"
#include "controllers/scsidev_ctrl.h"
#include "primary_device.h"
#include "block_device.h"
#include "device.h"
#include "disk_track_cache.h"
#include "file_support.h"
@ -30,8 +28,10 @@
#include <string>
#include <vector>
#include <map>
#include "scsi_block_commands.h"
#include "scsi_primary_commands.h"
class Disk : public Device, public PrimaryDevice, public BlockDevice
class Disk : public Device, public ScsiPrimaryCommands, public ScsiBlockCommands
{
private:
enum access_mode { RW6, RW10, RW16 };

View File

@ -5,7 +5,7 @@
//
// Copyright (C) 2021 Uwe Seimet
//
// A BlockDevice supports SCSI block commands (see https://www.t10.org/drafts.htm, SBC-5)
// Interface for SCSI block commands (see https://www.t10.org/drafts.htm, SBC-5)
//
//---------------------------------------------------------------------------
@ -13,12 +13,12 @@
class SASIDEV;
class BlockDevice
class ScsiBlockCommands
{
public:
BlockDevice() {};
virtual ~BlockDevice() {};
ScsiBlockCommands() {};
virtual ~ScsiBlockCommands() {};
// Mandatory commands
virtual void TestUnitReady(SASIDEV *) = 0;

View File

@ -5,7 +5,7 @@
//
// Copyright (C) 2021 Uwe Seimet
//
// An MmcDevice supports SCSI MMC commands (see https://www.t10.org/drafts.htm, MMC-6)
// Interface for SCSI MMC commands (see https://www.t10.org/drafts.htm, MMC-6)
//
//---------------------------------------------------------------------------
@ -13,12 +13,12 @@
class SASIDEV;
class MmcDevice
class ScsiMmcCommands
{
public:
MmcDevice() {};
virtual ~MmcDevice() {};
ScsiMmcCommands() {};
virtual ~ScsiMmcCommands() {};
virtual void ReadToc(SASIDEV *) = 0;
virtual void GetEventStatusNotification(SASIDEV *) = 0;

View File

@ -5,7 +5,7 @@
//
// Copyright (C) 2021 Uwe Seimet
//
// A PrimaryDevice supports SCSI primary commands (see https://www.t10.org/drafts.htm, SPC-6)
// Interface for SCSI primary commands (see https://www.t10.org/drafts.htm, SPC-6)
//
//---------------------------------------------------------------------------
@ -13,12 +13,12 @@
class SASIDEV;
class PrimaryDevice
class ScsiPrimaryCommands
{
public:
PrimaryDevice() {};
virtual ~PrimaryDevice() {};
ScsiPrimaryCommands() {};
virtual ~ScsiPrimaryCommands() {};
// Mandatory commands
virtual void TestUnitReady(SASIDEV *) = 0;

View File

@ -225,7 +225,7 @@ bool CDTrack::IsAudio() const
// Constructor
//
//---------------------------------------------------------------------------
SCSICD::SCSICD() : Disk("SCCD"), MmcDevice(), FileSupport()
SCSICD::SCSICD() : Disk("SCCD"), ScsiMmcCommands(), FileSupport()
{
// NOT in raw format
rawfile = false;

View File

@ -16,10 +16,10 @@
#pragma once
#include "os.h"
#include "primary_device.h"
#include "mmc_device.h"
#include "disk.h"
#include "filepath.h"
#include "scsi_mmc_commands.h"
#include "scsi_primary_commands.h"
//---------------------------------------------------------------------------
@ -69,7 +69,7 @@ private:
// SCSI CD-ROM
//
//===========================================================================
class SCSICD : public Disk, public MmcDevice, public FileSupport
class SCSICD : public Disk, public ScsiMmcCommands, public FileSupport
{
private:
typedef struct _command_t {