mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-05 18:23:16 +00:00
Reorganize open calls, add error log
This commit is contained in:
parent
84c3bdb140
commit
281a07e911
1 changed files with 5 additions and 4 deletions
|
@ -167,18 +167,19 @@ s32 PS4_SYSV_ABI posix_open(const char* raw_path, s32 flags, u16 mode) {
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s32 PS4_SYSV_ABI open(const char* filename, s32 flags) {
|
||||||
|
return posix_open(filename, flags, 0);
|
||||||
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI sceKernelOpen(const char* path, s32 flags, /* SceKernelMode*/ u16 mode) {
|
s32 PS4_SYSV_ABI sceKernelOpen(const char* path, s32 flags, /* SceKernelMode*/ u16 mode) {
|
||||||
s32 result = posix_open(path, flags, mode);
|
s32 result = posix_open(path, flags, mode);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
|
LOG_ERROR(Kernel_Pthread, "posix_open: error = {}", result);
|
||||||
return ErrnoToSceKernelError(*__Error());
|
return ErrnoToSceKernelError(*__Error());
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI open(const char* filename, s32 flags) {
|
|
||||||
return posix_open(filename, flags, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int PS4_SYSV_ABI sceKernelClose(int d) {
|
int PS4_SYSV_ABI sceKernelClose(int d) {
|
||||||
if (d < 3) { // d probably hold an error code
|
if (d < 3) { // d probably hold an error code
|
||||||
return ORBIS_KERNEL_ERROR_EPERM;
|
return ORBIS_KERNEL_ERROR_EPERM;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue