mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-21 02:17:25 +00:00
Added rascsi filter to limit logging to a particular device (#978)
* Support for ID and LUN parameter for the -L option in rascsi * Added DeviceLogger class * Removed dupiicate code * Fixed SonarQube issues * Added unit tests, improved code sharing * Fixed regression (#979)
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
// work with the Sharp X68000 operating system.
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include "shared/log.h"
|
||||
#include "shared/rascsi_exceptions.h"
|
||||
#include "scsi_command_util.h"
|
||||
#include "scsi_host_bridge.h"
|
||||
@@ -27,6 +26,11 @@ using namespace std;
|
||||
using namespace scsi_defs;
|
||||
using namespace scsi_command_util;
|
||||
|
||||
SCSIBR::SCSIBR(int lun) : PrimaryDevice(SCBR, lun)
|
||||
{
|
||||
SupportsParams(true);
|
||||
}
|
||||
|
||||
bool SCSIBR::Init(const unordered_map<string, string>& params)
|
||||
{
|
||||
PrimaryDevice::Init(params);
|
||||
@@ -38,13 +42,11 @@ bool SCSIBR::Init(const unordered_map<string, string>& params)
|
||||
AddCommand(scsi_command::eCmdGetMessage10, [this] { GetMessage10(); });
|
||||
AddCommand(scsi_command::eCmdSendMessage10, [this] { SendMessage10(); });
|
||||
|
||||
SupportsParams(true);
|
||||
|
||||
#ifdef __linux__
|
||||
// TAP Driver Generation
|
||||
m_bTapEnable = tap.Init(GetParams());
|
||||
if (!m_bTapEnable){
|
||||
LOGERROR("Unable to open the TAP interface")
|
||||
GetLogger().Error("Unable to open the TAP interface");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user