diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index f0ab1713..c3b6c3ae 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -102,7 +102,7 @@ int PS4_SYSV_ABI posix_open(const char* path, int flags, /* SceKernelMode*/ u16 int result = sceKernelOpen(path, flags, mode); // Posix calls different only for their return values if (result < 0) { - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; @@ -130,7 +130,7 @@ int PS4_SYSV_ABI posix_close(int d) { int result = sceKernelClose(d); if (result < 0) { LOG_ERROR(Kernel_Pthread, "posix_close: error = {}", result); - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; @@ -189,7 +189,7 @@ s64 PS4_SYSV_ABI posix_lseek(int d, s64 offset, int whence) { int result = sceKernelLseek(d, offset, whence); if (result < 0) { LOG_ERROR(Kernel_Pthread, "posix_lseek: error = {}", result); - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; @@ -210,7 +210,7 @@ int PS4_SYSV_ABI posix_read(int d, void* buf, size_t nbytes) { int result = sceKernelRead(d, buf, nbytes); if (result < 0) { LOG_ERROR(Kernel_Pthread, "posix_read: error = {}", result); - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; @@ -241,7 +241,7 @@ int PS4_SYSV_ABI posix_mkdir(const char* path, u16 mode) { int result = sceKernelMkdir(path, mode); if (result < 0) { LOG_ERROR(Kernel_Pthread, "posix_mkdir: error = {}", result); - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; @@ -277,7 +277,7 @@ int PS4_SYSV_ABI posix_stat(const char* path, OrbisKernelStat* sb) { int result = sceKernelStat(path, sb); if (result < 0) { LOG_ERROR(Kernel_Pthread, "posix_stat: error = {}", result); - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; @@ -341,7 +341,7 @@ int PS4_SYSV_ABI posix_fstat(int fd, OrbisKernelStat* sb) { int result = sceKernelFStat(fd, sb); if (result < 0) { LOG_ERROR(Kernel_Pthread, "posix_fstat: error = {}", result); - err_sce_to_posix(result); + ErrSceToPosix(result); return -1; } return result; diff --git a/src/core/libraries/kernel/libkernel.cpp b/src/core/libraries/kernel/libkernel.cpp index f2faf049..74a1ab7a 100644 --- a/src/core/libraries/kernel/libkernel.cpp +++ b/src/core/libraries/kernel/libkernel.cpp @@ -68,7 +68,7 @@ int* PS4_SYSV_ABI __Error() { return &g_posix_errno; } -void err_sce_to_posix(int result) { +void ErrSceToPosix(int result) { int rt = result > SCE_KERNEL_ERROR_UNKNOWN && result <= SCE_KERNEL_ERROR_ESTOP ? result + -SCE_KERNEL_ERROR_UNKNOWN : POSIX_EOTHER; diff --git a/src/core/libraries/kernel/libkernel.h b/src/core/libraries/kernel/libkernel.h index 07413888..04dc8ba5 100644 --- a/src/core/libraries/kernel/libkernel.h +++ b/src/core/libraries/kernel/libkernel.h @@ -12,7 +12,7 @@ class SymbolsResolver; namespace Libraries::Kernel { -void err_sce_to_posix(int result); +void ErrSceToPosix(int result); struct OrbisTimesec { time_t t;