Merge pull request #13112 from Tilka/ioslog

IOS: log cIOS device checks as warnings, not errors
This commit is contained in:
JMC47 2024-10-17 12:17:47 -04:00 committed by GitHub
commit 3d7ae07dbf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -689,7 +689,13 @@ std::optional<IPCReply> EmulationKernel::OpenDevice(OpenRequest& request)
if (!device) if (!device)
{ {
ERROR_LOG_FMT(IOS, "Unknown device: {}", request.path); constexpr std::string_view cios_devices[] = {"/dev/flash", "/dev/mload", "/dev/sdio/sdhc",
"/dev/usb123", "/dev/usb2"};
static_assert(std::ranges::is_sorted(cios_devices));
if (std::ranges::binary_search(cios_devices, request.path))
WARN_LOG_FMT(IOS, "Possible anti-piracy check for cIOS device {}", request.path);
else
ERROR_LOG_FMT(IOS, "Unknown device: {}", request.path);
return IPCReply{IPC_ENOENT, 3700_tbticks}; return IPCReply{IPC_ENOENT, 3700_tbticks};
} }