Filesystem errors and Base Array Layers (#280)

* Filesystem errors and Base Array Layers

* Fixed build for POSIX

* forgot 1 file
This commit is contained in:
Vladislav Mikhalin 2024-07-11 14:37:21 +03:00 committed by GitHub
parent 59be090c83
commit 989f88837d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 34 additions and 26 deletions

View file

@ -106,12 +106,17 @@ int* PS4_SYSV_ABI __Error() {
}
void ErrSceToPosix(int result) {
int rt = result > SCE_KERNEL_ERROR_UNKNOWN && result <= SCE_KERNEL_ERROR_ESTOP
? result + -SCE_KERNEL_ERROR_UNKNOWN
: POSIX_EOTHER;
const int rt = result > SCE_KERNEL_ERROR_UNKNOWN && result <= SCE_KERNEL_ERROR_ESTOP
? result + -SCE_KERNEL_ERROR_UNKNOWN
: POSIX_EOTHER;
g_posix_errno = rt;
}
int ErrnoToSceKernelError(int e) {
const auto res = SCE_KERNEL_ERROR_UNKNOWN + e;
return res > SCE_KERNEL_ERROR_ESTOP ? SCE_KERNEL_ERROR_UNKNOWN : res;
}
int PS4_SYSV_ABI sceKernelMmap(void* addr, u64 len, int prot, int flags, int fd, size_t offset,
void** res) {
LOG_INFO(Kernel_Vmm, "called addr = {}, len = {}, prot = {}, flags = {}, fd = {}, offset = {}",