AnyPS5/core/libs
Doston Abdullayev 1fd723f21f fix(libkernel): return errors from file operation failures
On Windows, sceKernelPread and sceKernelPwrite called the POSIX pread and
pwrite wrappers, which throw on every failure, so a bad descriptor, a
negative offset or a write to a read-only descriptor aborted the process
instead of returning an error as the Linux build does. ftruncate and
sceKernelFtruncate threw on any host failure on both platforms.

Give the Windows sceKernelPread and sceKernelPwrite the same checks and
SceErrorFromErrno returns as the Linux ones, and accept a zero-length
transfer with a null buffer. Report a positioned transfer on a handle
opened without the needed access as EBADF instead of EIO. Return EINVAL
from ftruncate for a negative length and for a descriptor opened without
write access, as FreeBSD does, and pass other host errors to the guest.

Fixes #2423
2026-10-10 21:23:30 +13:00
..
nid feat(nid): patch NIDs in Mach-O libraries 2026-10-09 15:40:29 +03:00
prx fix(libkernel): return errors from file operation failures 2026-10-10 21:23:30 +13:00
tests fix(libkernel): return errors from file operation failures 2026-10-10 21:23:30 +13:00
CMakeLists.txt Merge pull request #2247 from mugurc/macos-nid 2026-10-10 08:15:03 +02:00
HitLog.hpp style(prx): apply CONVENTIONS.md to misc PRX additions 2026-09-29 04:24:39 +03:00
SceShaders.hpp
…
SceTypes.hpp feat(libkernel): implement sceKernelGetModuleInfo 2026-10-09 19:39:49 -04:00