Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 24, 2025
1 parent a3087c5 commit 34d6de3
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 23 deletions.
25 changes: 25 additions & 0 deletions cpp/base/primary_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "primary_device.h"
#include <spdlog/sinks/stdout_color_sinks.h>
#include "controllers/abstract_controller.h"
#include "shared/command_meta_data.h"
#include "shared/s2p_exceptions.h"

Expand Down Expand Up @@ -420,3 +421,27 @@ void PrimaryDevice::ModeSelect(cdb_t, data_out_t, int, int)
throw ScsiException(SenseKey::ILLEGAL_REQUEST, Asc::INVALID_FIELD_IN_CDB);
}

int PrimaryDevice::GetCdbByte(int index) const
{
return controller->GetCdb()[index];
}

int PrimaryDevice::GetCdbInt16(int index) const
{
return memory_util::GetInt16(controller->GetCdb(), index);
}

int PrimaryDevice::GetCdbInt24(int index) const
{
return memory_util::GetInt24(controller->GetCdb(), index);
}

uint32_t PrimaryDevice::GetCdbInt32(int index) const
{
return memory_util::GetInt32(controller->GetCdb(), index);
}

uint64_t PrimaryDevice::GetCdbInt64(int index) const
{
return memory_util::GetInt64(controller->GetCdb(), index);
}
33 changes: 10 additions & 23 deletions cpp/base/primary_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
#pragma once

#include <functional>
#include "controllers/abstract_controller.h"
#include "shared/memory_util.h"
#include "device.h"
#include "shared/memory_util.h"
#include "shared/s2p_defs.h"

class AbstractController;

class PrimaryDevice : public Device
{
Expand All @@ -39,7 +41,7 @@ class PrimaryDevice : public Device

virtual void Dispatch(ScsiCommand);

auto* GetController() const
AbstractController* GetController() const
{
return controller;
}
Expand Down Expand Up @@ -148,26 +150,11 @@ class PrimaryDevice : public Device
void DataInPhase(int) const;
void DataOutPhase(int) const;

auto GetCdbByte(int index) const
{
return controller->GetCdb()[index];
}
auto GetCdbInt16(int index) const
{
return memory_util::GetInt16(controller->GetCdb(), index);
}
auto GetCdbInt24(int index) const
{
return memory_util::GetInt24(controller->GetCdb(), index);
}
auto GetCdbInt32(int index) const
{
return memory_util::GetInt32(controller->GetCdb(), index);
}
auto GetCdbInt64(int index) const
{
return memory_util::GetInt64(controller->GetCdb(), index);
}
int GetCdbByte(int) const;
int GetCdbInt16(int) const;
int GetCdbInt24(int) const;
uint32_t GetCdbInt32(int) const;
uint64_t GetCdbInt64(int) const;

private:

Expand Down
1 change: 1 addition & 0 deletions cpp/command/command_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "base/property_handler.h"
#include "command_context.h"
#include "command_image_support.h"
#include "controllers/abstract_controller.h"
#include "controllers/controller_factory.h"
#include "devices/disk.h"
#include "devices/scsi_generic.h"
Expand Down
1 change: 1 addition & 0 deletions cpp/controllers/abstract_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
//---------------------------------------------------------------------------

#include "abstract_controller.h"
#include <spdlog/sinks/stdout_color_sinks.h>
#include "base/primary_device.h"
#include "buses/bus.h"
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/daynaport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//---------------------------------------------------------------------------

#include "daynaport.h"
#include "controllers/abstract_controller.h"
#include "shared/network_util.h"
#include "shared/s2p_exceptions.h"

Expand Down
1 change: 1 addition & 0 deletions cpp/devices/disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "disk.h"
#include "disk_cache.h"
#include "linux_cache.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

using namespace spdlog;
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/host_services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
#include <google/protobuf/util/json_util.h>
#include "command/command_context.h"
#include "command/command_dispatcher.h"
#include "controllers/abstract_controller.h"
#include "protobuf/protobuf_util.h"
#include "shared/s2p_exceptions.h"
#include "page_handler.h"
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/page_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "page_handler.h"
#include "base/primary_device.h"
#include "base/property_handler.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

using namespace spdlog;
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/printer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#include "printer.h"
#include <filesystem>
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

using namespace filesystem;
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/sasi_hd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//---------------------------------------------------------------------------

#include "sasi_hd.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

SasiHd::SasiHd(int lun, const set<uint32_t> &sector_sizes) : Disk(SAHD, lun, false, false, sector_sizes)
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/scsi_cd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
//---------------------------------------------------------------------------

#include "scsi_cd.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

using namespace memory_util;
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/scsi_generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <fcntl.h>
#include <scsi/sg.h>
#include <sys/ioctl.h>
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"
#include "shared/sg_util.h"

Expand Down
1 change: 1 addition & 0 deletions cpp/devices/scsi_hd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//---------------------------------------------------------------------------

#include "scsi_hd.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

using namespace memory_util;
Expand Down
1 change: 1 addition & 0 deletions cpp/devices/tape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "tape.h"
#include "base/property_handler.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"

using namespace spdlog;
Expand Down

0 comments on commit 34d6de3

Please sign in to comment.