Common: Unify logging namespace with Common

Previously the logging was a in a little bit of a disarray. Some things
were in namespaces, and other things were not.

Given this code will feature a bit of restructuring during the
transition over to fmt, this is a good time to unify it under a single
namespace and also remove functions and types from the global namespace.

Now, all functions and types are under the Common::Log namespace. The
only outliers being, of course, the preprocessor macros.
This commit is contained in:
Lioncash 2019-11-28 04:19:24 -05:00
commit c792961000
42 changed files with 261 additions and 245 deletions

View file

@ -312,7 +312,7 @@ static void VLogInfo(std::string_view format, fmt::format_args args)
return;
const bool use_internal_log = s_use_internal_log.load(std::memory_order_relaxed);
if (MAX_LOGLEVEL < LogTypes::LINFO && !use_internal_log)
if (MAX_LOGLEVEL < Common::Log::LINFO && !use_internal_log)
return;
std::string text = fmt::vformat(format, args);

View file

@ -120,7 +120,7 @@ void PrintCallstack()
});
}
void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level)
void PrintCallstack(Common::Log::LOG_TYPE type, Common::Log::LOG_LEVELS level)
{
GENERIC_LOG(type, level, "== STACK TRACE - SP = %08x ==", PowerPC::ppcState.gpr[1]);
@ -142,9 +142,10 @@ void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level)
});
}
void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size, const std::string& title)
void PrintDataBuffer(Common::Log::LOG_TYPE type, const u8* data, size_t size,
const std::string& title)
{
GENERIC_LOG(type, LogTypes::LDEBUG, "%s", title.c_str());
GENERIC_LOG(type, Common::Log::LDEBUG, "%s", title.c_str());
for (u32 j = 0; j < size;)
{
std::string hex_line;
@ -155,7 +156,7 @@ void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size, const
if (j >= size)
break;
}
GENERIC_LOG(type, LogTypes::LDEBUG, " Data: %s", hex_line.c_str());
GENERIC_LOG(type, Common::Log::LDEBUG, " Data: %s", hex_line.c_str());
}
}

View file

@ -20,8 +20,8 @@ struct CallstackEntry
bool GetCallstack(std::vector<CallstackEntry>& output);
void PrintCallstack();
void PrintCallstack(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level);
void PrintDataBuffer(LogTypes::LOG_TYPE type, const u8* data, size_t size,
void PrintCallstack(Common::Log::LOG_TYPE type, Common::Log::LOG_LEVELS level);
void PrintDataBuffer(Common::Log::LOG_TYPE type, const u8* data, size_t size,
const std::string& title);
void AddAutoBreakpoints();

View file

@ -54,8 +54,11 @@ static bool IsSoundFile(const std::string& filename)
void Log(const DiscIO::Volume& volume, const DiscIO::Partition& partition, u64 offset)
{
// Do nothing if the log isn't selected
if (!LogManager::GetInstance()->IsEnabled(LogTypes::FILEMON, LogTypes::LWARNING))
if (!Common::Log::LogManager::GetInstance()->IsEnabled(Common::Log::FILEMON,
Common::Log::LWARNING))
{
return;
}
const DiscIO::FileSystem* file_system = volume.GetFileSystem(partition);

View file

@ -338,10 +338,10 @@ int CSIDevice_GBA::RunBuffer(u8* buffer, int request_length)
return sizeof(reply);
}
#ifdef _DEBUG
LogTypes::LOG_LEVELS log_level = (m_last_cmd == CMD_STATUS || m_last_cmd == CMD_RESET) ?
LogTypes::LERROR :
LogTypes::LWARNING;
GENERIC_LOG(LogTypes::SERIALINTERFACE, log_level,
const Common::Log::LOG_LEVELS log_level =
(m_last_cmd == CMD_STATUS || m_last_cmd == CMD_RESET) ? Common::Log::LERROR :
Common::Log::LWARNING;
GENERIC_LOG(Common::Log::SERIALINTERFACE, log_level,
"%01d [< %02x%02x%02x%02x%02x] (%i)", m_device_number,
buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], num_data_received);
#endif

View file

@ -115,7 +115,7 @@ IPCCommandResult DI::IOCtlV(const IOCtlVRequest& request)
break;
}
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_DI);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_DI);
}
return GetDefaultReply(return_value);
}

View file

@ -94,15 +94,15 @@ bool IOCtlVRequest::HasNumberOfValidVectors(const size_t in_count, const size_t
std::all_of(io_vectors.begin(), io_vectors.end(), IsValidVector);
}
void IOCtlRequest::Log(const std::string& device_name, LogTypes::LOG_TYPE type,
LogTypes::LOG_LEVELS verbosity) const
void IOCtlRequest::Log(const std::string& device_name, Common::Log::LOG_TYPE type,
Common::Log::LOG_LEVELS verbosity) const
{
GENERIC_LOG(type, verbosity, "%s (fd %u) - IOCtl 0x%x (in_size=0x%x, out_size=0x%x)",
device_name.c_str(), fd, request, buffer_in_size, buffer_out_size);
}
void IOCtlRequest::Dump(const std::string& description, LogTypes::LOG_TYPE type,
LogTypes::LOG_LEVELS level) const
void IOCtlRequest::Dump(const std::string& description, Common::Log::LOG_TYPE type,
Common::Log::LOG_LEVELS level) const
{
Log("===== " + description, type, level);
GENERIC_LOG(type, level, "In buffer\n%s",
@ -111,14 +111,14 @@ void IOCtlRequest::Dump(const std::string& description, LogTypes::LOG_TYPE type,
HexDump(Memory::GetPointer(buffer_out), buffer_out_size).c_str());
}
void IOCtlRequest::DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type,
LogTypes::LOG_LEVELS level) const
void IOCtlRequest::DumpUnknown(const std::string& description, Common::Log::LOG_TYPE type,
Common::Log::LOG_LEVELS level) const
{
Dump("Unknown IOCtl - " + description, type, level);
}
void IOCtlVRequest::Dump(const std::string& description, LogTypes::LOG_TYPE type,
LogTypes::LOG_LEVELS level) const
void IOCtlVRequest::Dump(const std::string& description, Common::Log::LOG_TYPE type,
Common::Log::LOG_LEVELS level) const
{
GENERIC_LOG(type, level, "===== %s (fd %u) - IOCtlV 0x%x (%zu in, %zu io)", description.c_str(),
fd, request, in_vectors.size(), io_vectors.size());
@ -133,8 +133,8 @@ void IOCtlVRequest::Dump(const std::string& description, LogTypes::LOG_TYPE type
GENERIC_LOG(type, level, "io[%zu] (size=0x%x)", i++, vector.size);
}
void IOCtlVRequest::DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type,
LogTypes::LOG_LEVELS level) const
void IOCtlVRequest::DumpUnknown(const std::string& description, Common::Log::LOG_TYPE type,
Common::Log::LOG_LEVELS level) const
{
Dump("Unknown IOCtlV - " + description, type, level);
}

View file

@ -130,12 +130,12 @@ struct IOCtlRequest final : Request
u32 buffer_out = 0;
u32 buffer_out_size = 0;
explicit IOCtlRequest(u32 address);
void Log(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::IOS,
LogTypes::LOG_LEVELS level = LogTypes::LINFO) const;
void Dump(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::IOS,
LogTypes::LOG_LEVELS level = LogTypes::LINFO) const;
void DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::IOS,
LogTypes::LOG_LEVELS level = LogTypes::LERROR) const;
void Log(const std::string& description, Common::Log::LOG_TYPE type = Common::Log::IOS,
Common::Log::LOG_LEVELS level = Common::Log::LINFO) const;
void Dump(const std::string& description, Common::Log::LOG_TYPE type = Common::Log::IOS,
Common::Log::LOG_LEVELS level = Common::Log::LINFO) const;
void DumpUnknown(const std::string& description, Common::Log::LOG_TYPE type = Common::Log::IOS,
Common::Log::LOG_LEVELS level = Common::Log::LERROR) const;
};
struct IOCtlVRequest final : Request
@ -157,10 +157,10 @@ struct IOCtlVRequest final : Request
const IOVector* GetVector(size_t index) const;
explicit IOCtlVRequest(u32 address);
bool HasNumberOfValidVectors(size_t in_count, size_t io_count) const;
void Dump(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::IOS,
LogTypes::LOG_LEVELS level = LogTypes::LINFO) const;
void DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::IOS,
LogTypes::LOG_LEVELS level = LogTypes::LERROR) const;
void Dump(const std::string& description, Common::Log::LOG_TYPE type = Common::Log::IOS,
Common::Log::LOG_LEVELS level = Common::Log::LINFO) const;
void DumpUnknown(const std::string& description, Common::Log::LOG_TYPE type = Common::Log::IOS,
Common::Log::LOG_LEVELS level = Common::Log::LERROR) const;
};
namespace Device

View file

@ -541,7 +541,7 @@ IPCCommandResult ES::IOCtlV(const IOCtlVRequest& request)
case IOCTL_ES_UNKNOWN_42:
PanicAlert("IOS-ES: Unimplemented ioctlv 0x%x (%zu in vectors, %zu io vectors)",
request.request, request.in_vectors.size(), request.io_vectors.size());
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_ES, LogTypes::LERROR);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_ES, Common::Log::LERROR);
return GetDefaultReply(IPC_EINVAL);
case IOCTL_ES_INVALID_3F:

View file

@ -51,7 +51,8 @@ template <typename... Args>
static void LogResult(ResultCode code, std::string_view format, Args&&... args)
{
const std::string command = fmt::format(format, std::forward<Args>(args)...);
GENERIC_LOG(LogTypes::IOS_FS, (code == ResultCode::Success ? LogTypes::LINFO : LogTypes::LERROR),
GENERIC_LOG(Common::Log::IOS_FS,
(code == ResultCode::Success ? Common::Log::LINFO : Common::Log::LERROR),
"%s: result %d", command.c_str(), ConvertResult(code));
}

View file

@ -315,7 +315,7 @@ IPCCommandResult NetIPTop::IOCtl(const IOCtlRequest& request)
case IOCTL_SO_ICMPCANCEL:
return HandleICMPCancelRequest(request);
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_NET);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_NET);
break;
}
@ -337,7 +337,7 @@ IPCCommandResult NetIPTop::IOCtlV(const IOCtlVRequest& request)
case IOCTLV_SO_ICMPPING:
return HandleICMPPingRequest(request);
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_NET);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_NET);
break;
}
@ -351,7 +351,7 @@ void NetIPTop::Update()
IPCCommandResult NetIPTop::HandleStartUpRequest(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
return GetDefaultReply(IPC_SUCCESS);
}
@ -404,7 +404,7 @@ IPCCommandResult NetIPTop::HandleDoSockRequest(const IOCtlRequest& request)
IPCCommandResult NetIPTop::HandleShutdownRequest(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
u32 fd = Memory::Read_U32(request.buffer_in);
u32 how = Memory::Read_U32(request.buffer_in + 4);
@ -419,7 +419,7 @@ IPCCommandResult NetIPTop::HandleListenRequest(const IOCtlRequest& request)
u32 BACKLOG = Memory::Read_U32(request.buffer_in + 0x04);
u32 ret = listen(WiiSockMan::GetInstance().GetHostSocket(fd), BACKLOG);
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
return GetDefaultReply(WiiSockMan::GetNetErrorCode(ret, "SO_LISTEN", false));
}
@ -429,7 +429,7 @@ IPCCommandResult NetIPTop::HandleGetSockOptRequest(const IOCtlRequest& request)
u32 level = Memory::Read_U32(request.buffer_out + 4);
u32 optname = Memory::Read_U32(request.buffer_out + 8);
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
// Do the level/optname translation
int nat_level = MapWiiSockOptLevelToNative(level);
@ -495,7 +495,7 @@ IPCCommandResult NetIPTop::HandleGetSockNameRequest(const IOCtlRequest& request)
{
u32 fd = Memory::Read_U32(request.buffer_in);
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
sockaddr sa;
socklen_t sa_len = sizeof(sa);
@ -544,7 +544,7 @@ IPCCommandResult NetIPTop::HandleGetPeerNameRequest(const IOCtlRequest& request)
IPCCommandResult NetIPTop::HandleGetHostIDRequest(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
const DefaultInterface interface = GetSystemDefaultInterfaceOrFallback();
return GetDefaultReply(Common::swap32(interface.inet));
}
@ -1040,7 +1040,7 @@ IPCCommandResult NetIPTop::HandleGetAddressInfoRequest(const IOCtlVRequest& requ
ret = SO_ERROR_HOST_NOT_FOUND;
}
request.Dump(GetDeviceName(), LogTypes::IOS_NET, LogTypes::LINFO);
request.Dump(GetDeviceName(), Common::Log::IOS_NET, Common::Log::LINFO);
return GetDefaultReply(ret);
}

View file

@ -145,7 +145,7 @@ IPCCommandResult NetKDRequest::IOCtl(const IOCtlRequest& request)
break;
default:
request.Log(GetDeviceName(), LogTypes::IOS_WC24);
request.Log(GetDeviceName(), Common::Log::IOS_WC24);
}
return GetDefaultReply(return_value);

View file

@ -67,7 +67,7 @@ IPCCommandResult NetKDTime::IOCtl(const IOCtlRequest& request)
break;
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_WC24);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_WC24);
break;
}

View file

@ -82,7 +82,7 @@ int NetSSL::GetSSLFreeID() const
IPCCommandResult NetSSL::IOCtl(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_SSL, LogTypes::LINFO);
request.Log(GetDeviceName(), Common::Log::IOS_SSL, Common::Log::LINFO);
return GetDefaultReply(IPC_SUCCESS);
}
@ -565,7 +565,7 @@ IPCCommandResult NetSSL::IOCtlV(const IOCtlVRequest& request)
break;
}
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_SSL);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_SSL);
}
// SSL return codes are written to BufferIn

View file

@ -268,7 +268,7 @@ void WiiSocket::Update(bool read, bool write, bool except)
ReturnValue = WiiSockMan::GetInstance().AddSocket(ret, true);
ioctl.Log("IOCTL_SO_ACCEPT", LogTypes::IOS_NET);
ioctl.Log("IOCTL_SO_ACCEPT", Common::Log::IOS_NET);
break;
}
default:

View file

@ -88,7 +88,7 @@ IPCCommandResult NetWDCommand::IOCtlV(const IOCtlVRequest& request)
case IOCTLV_WD_RECV_FRAME:
case IOCTLV_WD_RECV_NOTIFICATION:
default:
request.Dump(GetDeviceName(), LogTypes::IOS_NET, LogTypes::LINFO);
request.Dump(GetDeviceName(), Common::Log::IOS_NET, Common::Log::LINFO);
}
return GetDefaultReply(return_value);

View file

@ -56,7 +56,7 @@ IPCCommandResult STMImmediate::IOCtl(const IOCtlRequest& request)
break;
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_STM);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_STM);
}
return GetDefaultReply(return_value);

View file

@ -206,7 +206,7 @@ IPCCommandResult BluetoothEmu::IOCtlV(const IOCtlVRequest& request)
}
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_WIIMOTE);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_WIIMOTE);
}
return send_reply ? GetDefaultReply(IPC_SUCCESS) : GetNoReply();
@ -1726,7 +1726,7 @@ void BluetoothEmu::CommandVendorSpecific_FC4F(const u8* input, u32 size)
INFO_LOG(IOS_WIIMOTE, "Command: CommandVendorSpecific_FC4F: (callstack WUDiRemovePatch)");
DEBUG_LOG(IOS_WIIMOTE, "Input (size 0x%x):", size);
Dolphin_Debugger::PrintDataBuffer(LogTypes::IOS_WIIMOTE, input, size, "Data: ");
Dolphin_Debugger::PrintDataBuffer(Common::Log::IOS_WIIMOTE, input, size, "Data: ");
SendEventCommandComplete(0xFC4F, &reply, sizeof(hci_status_rp));
}
@ -1738,7 +1738,7 @@ void BluetoothEmu::CommandVendorSpecific_FC4C(const u8* input, u32 size)
DEBUG_LOG(IOS_WIIMOTE, "Command: CommandVendorSpecific_FC4C:");
DEBUG_LOG(IOS_WIIMOTE, "Input (size 0x%x):", size);
Dolphin_Debugger::PrintDataBuffer(LogTypes::IOS_WIIMOTE, input, size, "Data: ");
Dolphin_Debugger::PrintDataBuffer(Common::Log::IOS_WIIMOTE, input, size, "Data: ");
SendEventCommandComplete(0xFC4C, &reply, sizeof(hci_status_rp));
}

View file

@ -734,7 +734,7 @@ static int ParseAttribList(u8* attrib_id_list, u16& start_id, u16& end_id)
const u8 type_id = attrib_list.Read8(attrib_offset);
attrib_offset++;
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG)
if constexpr (MAX_LOGLEVEL >= Common::Log::LOG_LEVELS::LDEBUG)
{
DEBUG_ASSERT(sequence == SDP_SEQ8);
(void)seq_size;
@ -794,15 +794,10 @@ void WiimoteDevice::SDPSendServiceAttributeResponse(u16 cid, u16 transaction_id,
header->length = (u16)(offset - sizeof(l2cap_hdr_t));
m_host->SendACLPacket(GetConnectionHandle(), data_frame, header->length + sizeof(l2cap_hdr_t));
// Debugger::PrintDataBuffer(LogTypes::WIIMOTE, data_frame, header->length + sizeof(l2cap_hdr_t),
// "test response: ");
}
void WiimoteDevice::HandleSDP(u16 cid, u8* data, u32 size)
{
// Debugger::PrintDataBuffer(LogTypes::WIIMOTE, data, size, "HandleSDP: ");
CBigEndianBuffer buffer(data);
switch (buffer.Read8(0))
@ -889,9 +884,6 @@ void WiimoteDevice::SendCommandToACL(u8 ident, u8 code, u8 command_length, u8* c
// send ....
m_host->SendACLPacket(GetConnectionHandle(), data_frame, header->length + sizeof(l2cap_hdr_t));
// Debugger::PrintDataBuffer(LogTypes::WIIMOTE, data_frame, header->length + sizeof(l2cap_hdr_t),
// "m_pHost->SendACLPacket: ");
}
void WiimoteDevice::ReceiveL2capData(u16 scid, const void* data, u32 size)

View file

@ -40,7 +40,7 @@ IPCCommandResult OH0::Open(const OpenRequest& request)
IPCCommandResult OH0::IOCtl(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_USB);
request.Log(GetDeviceName(), Common::Log::IOS_USB);
switch (request.request)
{
case USB::IOCTL_USBV0_GETRHDESCA:
@ -136,7 +136,7 @@ IPCCommandResult OH0::GetRhDesca(const IOCtlRequest& request) const
// Based on a hardware test, this ioctl seems to return a constant value
Memory::Write_U32(0x02000302, request.buffer_out);
request.Dump(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LWARNING);
request.Dump(GetDeviceName(), Common::Log::IOS_USB, Common::Log::LWARNING);
return GetDefaultReply(IPC_SUCCESS);
}
@ -146,7 +146,7 @@ IPCCommandResult OH0::GetRhPortStatus(const IOCtlVRequest& request) const
return GetDefaultReply(IPC_EINVAL);
ERROR_LOG(IOS_USB, "Unimplemented IOCtlV: IOCTLV_USBV0_GETRHPORTSTATUS");
request.Dump(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LERROR);
request.Dump(GetDeviceName(), Common::Log::IOS_USB, Common::Log::LERROR);
return GetDefaultReply(IPC_SUCCESS);
}
@ -156,7 +156,7 @@ IPCCommandResult OH0::SetRhPortStatus(const IOCtlVRequest& request)
return GetDefaultReply(IPC_EINVAL);
ERROR_LOG(IOS_USB, "Unimplemented IOCtlV: IOCTLV_USBV0_SETRHPORTSTATUS");
request.Dump(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LERROR);
request.Dump(GetDeviceName(), Common::Log::IOS_USB, Common::Log::LERROR);
return GetDefaultReply(IPC_SUCCESS);
}
@ -209,7 +209,7 @@ IPCCommandResult OH0::RegisterClassChangeHook(const IOCtlVRequest& request)
if (!request.HasNumberOfValidVectors(1, 0))
return GetDefaultReply(IPC_EINVAL);
WARN_LOG(IOS_USB, "Unimplemented IOCtlV: USB::IOCTLV_USBV0_DEVICECLASSCHANGE (no reply)");
request.Dump(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LWARNING);
request.Dump(GetDeviceName(), Common::Log::IOS_USB, Common::Log::LWARNING);
return GetNoReply();
}
@ -308,7 +308,7 @@ IPCCommandResult OH0::DeviceIOCtlV(const u64 device_id, const IOCtlVRequest& req
return HandleTransfer(device, request.request,
[&, this]() { return SubmitTransfer(*device, request); });
case USB::IOCTLV_USBV0_UNKNOWN_32:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_USB);
return GetDefaultReply(IPC_SUCCESS);
default:
return GetDefaultReply(IPC_EINVAL);

View file

@ -33,7 +33,7 @@ USB_HIDv4::~USB_HIDv4()
IPCCommandResult USB_HIDv4::IOCtl(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_USB);
request.Log(GetDeviceName(), Common::Log::IOS_USB);
switch (request.request)
{
case USB::IOCTL_USBV4_GETVERSION:
@ -61,7 +61,7 @@ IPCCommandResult USB_HIDv4::IOCtl(const IOCtlRequest& request)
[&, this]() { return SubmitTransfer(*device, request); });
}
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_USB);
return GetDefaultReply(IPC_SUCCESS);
}
}

View file

@ -22,7 +22,7 @@ USB_HIDv5::~USB_HIDv5() = default;
IPCCommandResult USB_HIDv5::IOCtl(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_USB);
request.Log(GetDeviceName(), Common::Log::IOS_USB);
switch (request.request)
{
case USB::IOCTL_USBV5_GETVERSION:
@ -44,14 +44,14 @@ IPCCommandResult USB_HIDv5::IOCtl(const IOCtlRequest& request)
return HandleDeviceIOCtl(request,
[&](USBV5Device& device) { return CancelEndpoint(device, request); });
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LERROR);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_USB, Common::Log::LERROR);
return GetDefaultReply(IPC_SUCCESS);
}
}
IPCCommandResult USB_HIDv5::IOCtlV(const IOCtlVRequest& request)
{
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_USB);
switch (request.request)
{
// TODO: HIDv5 seems to be able to queue transfers depending on the transfer length (unlike VEN).

View file

@ -22,7 +22,7 @@ USB_VEN::~USB_VEN() = default;
IPCCommandResult USB_VEN::IOCtl(const IOCtlRequest& request)
{
request.Log(GetDeviceName(), LogTypes::IOS_USB);
request.Log(GetDeviceName(), Common::Log::IOS_USB);
switch (request.request)
{
case USB::IOCTL_USBV5_GETVERSION:
@ -47,7 +47,7 @@ IPCCommandResult USB_VEN::IOCtl(const IOCtlRequest& request)
return HandleDeviceIOCtl(request,
[&](USBV5Device& device) { return CancelEndpoint(device, request); });
default:
request.DumpUnknown(GetDeviceName(), LogTypes::IOS_USB, LogTypes::LERROR);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS_USB, Common::Log::LERROR);
return GetDefaultReply(IPC_SUCCESS);
}
}

View file

@ -543,7 +543,7 @@ IPCCommandResult WFSI::IOCtl(const IOCtlRequest& request)
// TODO(wfs): Should be returning an error. However until we have
// everything properly stubbed it's easier to simulate the methods
// succeeding.
request.DumpUnknown(GetDeviceName(), LogTypes::IOS, LogTypes::LWARNING);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS, Common::Log::LWARNING);
Memory::Memset(request.buffer_out, 0, request.buffer_out_size);
break;
}

View file

@ -355,7 +355,7 @@ IPCCommandResult WFSSRV::IOCtl(const IOCtlRequest& request)
default:
// TODO(wfs): Should be returning -3. However until we have everything
// properly stubbed it's easier to simulate the methods succeeding.
request.DumpUnknown(GetDeviceName(), LogTypes::IOS, LogTypes::LWARNING);
request.DumpUnknown(GetDeviceName(), Common::Log::IOS, Common::Log::LWARNING);
Memory::Memset(request.buffer_out, 0, request.buffer_out_size);
break;
}