ldr: Use proper names

This commit is contained in:
german77 2021-04-08 13:12:42 -06:00
parent a4e2821530
commit 278c38aa4a

View file

@ -118,9 +118,9 @@ public:
explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "ldr:dmnt"} { explicit DebugMonitor(Core::System& system_) : ServiceFramework{system_, "ldr:dmnt"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "AddProcessToDebugLaunchQueue"}, {0, nullptr, "SetProgramArgument"},
{1, nullptr, "ClearDebugLaunchQueue"}, {1, nullptr, "FlushArguments"},
{2, nullptr, "GetNsoInfos"}, {2, nullptr, "GetProcessModuleInfo"},
}; };
// clang-format on // clang-format on
@ -135,8 +135,8 @@ public:
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "CreateProcess"}, {0, nullptr, "CreateProcess"},
{1, nullptr, "GetProgramInfo"}, {1, nullptr, "GetProgramInfo"},
{2, nullptr, "RegisterTitle"}, {2, nullptr, "PinProgram"},
{3, nullptr, "UnregisterTitle"}, {3, nullptr, "UnpinProgram"},
{4, nullptr, "SetEnabledProgramVerification"}, {4, nullptr, "SetEnabledProgramVerification"},
}; };
// clang-format on // clang-format on
@ -150,8 +150,8 @@ public:
explicit Shell(Core::System& system_) : ServiceFramework{system_, "ldr:shel"} { explicit Shell(Core::System& system_) : ServiceFramework{system_, "ldr:shel"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "AddProcessToLaunchQueue"}, {0, nullptr, "SetProgramArgument"},
{1, nullptr, "ClearLaunchQueue"}, {1, nullptr, "FlushArguments"},
}; };
// clang-format on // clang-format on
@ -164,19 +164,19 @@ public:
explicit RelocatableObject(Core::System& system_) : ServiceFramework{system_, "ldr:ro"} { explicit RelocatableObject(Core::System& system_) : ServiceFramework{system_, "ldr:ro"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &RelocatableObject::LoadNro, "LoadNro"}, {0, &RelocatableObject::LoadModule, "LoadModule"},
{1, &RelocatableObject::UnloadNro, "UnloadNro"}, {1, &RelocatableObject::UnloadModule, "UnloadModule"},
{2, &RelocatableObject::LoadNrr, "LoadNrr"}, {2, &RelocatableObject::RegisterModuleInfo, "RegisterModuleInfo"},
{3, &RelocatableObject::UnloadNrr, "UnloadNrr"}, {3, &RelocatableObject::UnregisterModuleInfo, "UnregisterModuleInfo"},
{4, &RelocatableObject::Initialize, "Initialize"}, {4, &RelocatableObject::Initialize, "Initialize"},
{10, nullptr, "LoadNrrEx"}, {10, nullptr, "RegisterModuleInfo2"},
}; };
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }
void LoadNrr(Kernel::HLERequestContext& ctx) { void RegisterModuleInfo(Kernel::HLERequestContext& ctx) {
struct Parameters { struct Parameters {
u64_le process_id; u64_le process_id;
u64_le nrr_address; u64_le nrr_address;
@ -273,7 +273,7 @@ public:
rb.Push(RESULT_SUCCESS); rb.Push(RESULT_SUCCESS);
} }
void UnloadNrr(Kernel::HLERequestContext& ctx) { void UnregisterModuleInfo(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx}; IPC::RequestParser rp{ctx};
const auto pid = rp.Pop<u64>(); const auto pid = rp.Pop<u64>();
const auto nrr_address = rp.Pop<VAddr>(); const auto nrr_address = rp.Pop<VAddr>();
@ -408,7 +408,7 @@ public:
data_start, bss_end_addr - data_start, Kernel::KMemoryPermission::ReadAndWrite); data_start, bss_end_addr - data_start, Kernel::KMemoryPermission::ReadAndWrite);
} }
void LoadNro(Kernel::HLERequestContext& ctx) { void LoadModule(Kernel::HLERequestContext& ctx) {
struct Parameters { struct Parameters {
u64_le process_id; u64_le process_id;
u64_le image_address; u64_le image_address;
@ -546,7 +546,7 @@ public:
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
void UnloadNro(Kernel::HLERequestContext& ctx) { void UnloadModule(Kernel::HLERequestContext& ctx) {
if (!initialized) { if (!initialized) {
LOG_ERROR(Service_LDR, "LDR:RO not initialized before use!"); LOG_ERROR(Service_LDR, "LDR:RO not initialized before use!");
IPC::ResponseBuilder rb{ctx, 2}; IPC::ResponseBuilder rb{ctx, 2};