From 99d96218e1906ba020add93c0b0063bf9d434d34 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 15 Jul 2014 07:49:51 -0700 Subject: [PATCH] Correct some loadmodule error codes. --- Core/HLE/sceKernelModule.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index d424390420..609200170e 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -902,7 +902,7 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, bool fromTop, std delete [] newptr; module->Cleanup(); kernelObjects.Destroy(module->GetUID()); - error = -1; + error = SCE_KERNEL_ERROR_UNSUPPORTED_PRX_TYPE; return 0; } // Open ELF reader @@ -1635,12 +1635,13 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) if (!info.exists) { ERROR_LOG(LOADER, "sceKernelLoadModule(%s, %08x): File does not exist", name, flags); - return SCE_KERNEL_ERROR_NOFILE; + // ERRNO_FILE_NOT_FOUND + return 0x80010002; } if (!size) { ERROR_LOG(LOADER, "sceKernelLoadModule(%s, %08x): Module file is size 0", name, flags); - return SCE_KERNEL_ERROR_ILLEGAL_OBJECT; + return SCE_KERNEL_ERROR_FILEERR; } DEBUG_LOG(LOADER, "sceKernelLoadModule(%s, %08x)", name, flags);