#include #include #include "prx/libSceAutoMounterClient/include/Api.hpp" #include #include #include "SceTypes.hpp" #include "prx/libc/include/General.hpp" static_assert(sizeof(AutoMounterUsbDeviceInfo) == 944); static_assert(offsetof(AutoMounterUsbDeviceInfo, totalSpace) == 128); static_assert(offsetof(AutoMounterUsbDeviceInfo, availableSpace) == 136); static_assert(offsetof(AutoMounterUsbDeviceInfo, vendorId) == 144); static_assert(offsetof(AutoMounterUsbDeviceInfo, productId) == 146); static_assert(offsetof(AutoMounterUsbDeviceInfo, bcdDevice) == 148); static_assert(offsetof(AutoMounterUsbDeviceInfo, manufacturer) == 150); static_assert(offsetof(AutoMounterUsbDeviceInfo, manufacturerLength) == 408); static_assert(offsetof(AutoMounterUsbDeviceInfo, product) == 416); static_assert(offsetof(AutoMounterUsbDeviceInfo, productLength) == 672); static_assert(offsetof(AutoMounterUsbDeviceInfo, serialNumber) == 680); static_assert(offsetof(AutoMounterUsbDeviceInfo, serialNumberLength) == 936); constexpr int AUTOMOUNTER_ERROR_INVALID_ARGUMENT = static_cast(0x80F40002u); extern "C" { int APS5_VABI sceAutoMounterClientGetUsbDeviceInfo(const char* deviceName, AutoMounterUsbDeviceInfo* info) { if (deviceName != nullptr) { std::string name; if (CopyGuestString_nid_no_patch(deviceName, 128, name) != 0) return AUTOMOUNTER_ERROR_INVALID_ARGUMENT; char buf[128]; if (sscanf(name.c_str(), "/dev%127s", buf) == 0) return AUTOMOUNTER_ERROR_INVALID_ARGUMENT; } NotImplemented_nid_no_patch(__func__); return 0; } int APS5_VABI sceAutoMounterClientGetUsbDeviceList(char (*deviceNames)[64], std::int32_t* count) { if (deviceNames == nullptr || count == nullptr) return AUTOMOUNTER_ERROR_INVALID_ARGUMENT; NotImplemented_nid_no_patch(__func__); return 0; } int APS5_VABI sceAutoMounterClientInit(PthreadAttr* threadAttr) { NotImplemented_nid_no_patch(__func__); return 0; } int APS5_VABI sceAutoMounterClientRegisterCallback() { NotImplemented_nid_no_patch(__func__); return 0; } int APS5_VABI sceAutoMounterClientTerm() { NotImplemented_nid_no_patch(__func__); return 0; } int APS5_VABI sceAutoMounterClientUnregisterCallback() { NotImplemented_nid_no_patch(__func__); return 0; } }