libkernel: handle special case in path for load module (#2269)
Some checks are pending
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / get-info (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions

* libkernel: handle special case for load module

* fix linting
This commit is contained in:
panzone91 2025-01-31 09:51:03 +01:00 committed by GitHub
parent 49fc210833
commit ec0cf25097
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,8 +41,13 @@ s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t arg
return ORBIS_KERNEL_ERROR_EINVAL;
}
std::string guest_path(moduleFileName);
if (moduleFileName[0] != '/') {
guest_path = "/app0/" + guest_path;
}
auto* mnt = Common::Singleton<Core::FileSys::MntPoints>::Instance();
const auto path = mnt->GetHostPath(moduleFileName);
const auto path = mnt->GetHostPath(guest_path);
// Load PRX module and relocate any modules that import it.
auto* linker = Common::Singleton<Core::Linker>::Instance();