AnyPS5/core/libs/prx/libkernel
David 4dd97f7dbe feat(libkernel): implement chflags through the guest path resolver
PS5MC (PPSA99420, Kodi 22) imports chflags (ixrw0h2tWuI) from
libkernel.prx, one reference. Predicted stop once the imports ahead of
it (pthread_getthreadid_np, sendfile, wcstok, pause, setrlimit and the
termios calls) are covered (not a run):

  FAIL: unresolved ELF import ixrw0h2tWuI from libkernel.prx

The NID is computed with tools/nid_names.py and matches aerolib.

Follows FreeBSD 11.4 (8c639945a44588f6cfdddfb057bb5aad88735da0)
sys/kern/vfs_syscalls.c kern_chflagsat and setfflags, and
sys/ufs/ufs/ufs_vnops.c ufs_setattr, for a root caller: the lookup
through the guest resolver gives EFAULT, ENOENT and ENOTDIR (also for a
file reached through a trailing slash or used as a directory), a bit
outside the 17 UFS flags of sys/sys/stat.h (VNOVAL included) gives
EOPNOTSUPP, and SF_SNAPSHOT gives EPERM, since the snapshot flag cannot
be toggled. No host keeps BSD file flags and stat reports st_flags 0,
so flags 0 succeed without touching the file and any other flag throws
with the flags named. UF_READONLY and the other Windows-attribute flags
are not mapped to FILE_ATTRIBUTE_READONLY and its siblings: UFS stores
them without enforcing them, and on Windows the read-only attribute is
already the owner write bit of chmod.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
(cherry picked from commit 16e5b7ccd04e6467a5a282b6cfc9271304f42244)
2026-10-13 18:54:05 +00:00
..
Aio/src fix(aio): use precise polling sleep 2026-10-11 18:48:18 -04:00
AppMetadata Merge pull request #4558 from MiniRML/fix/kernel-json-number-locale 2026-10-13 15:37:49 +13:00
Apr fix(ampr): reserve remap targets before releasing pool pages 2026-10-13 07:50:53 +00:00
DirectMemory Merge pull request #3870 from yash27git/clean/Direct-Memory-Exception 2026-10-14 05:55:11 +13:00
Equeue fix(libkernel): route equeue socket checks by membership 2026-10-13 03:28:27 +00:00
EventFlag/src feat(runtime): timed waits, sync primitive fixes, heap and RTC fixes, unattended-run switches 2026-09-26 19:00:39 -07:00
File feat(libkernel): implement chflags through the guest path resolver 2026-10-13 18:54:05 +00:00
Module Merge pull request #4688 from eliyarson/fix/kernel-stat-relinked-prx 2026-10-13 17:48:42 +13:00
Pthread Merge pull request #4377 from MarcZX100/codex/carry-pthread-atfork-3628 2026-10-14 05:54:54 +13:00
Semaphore fix(libkernel): report the remaining time from sceKernelWaitSema 2026-10-11 20:09:33 +00:00
Socket fix(libkernel): accept POLLPRI on guest sockets under WSAPoll 2026-10-13 11:15:48 +02:00
SyncOnAddress/src feat(libkernel): wake each listed address in _umtx_op UMTX_OP_NWAKE_PRIVATE 2026-10-11 17:48:06 +00:00
System Merge pull request #4588 from Nixitov/feat/libkernel-host-hardware 2026-10-13 17:49:54 +02:00
Time feat(libkernel): add clock_settime with FreeBSD argument checks 2026-10-13 14:57:46 +01:00
CMakeLists.txt Merge pull request #4377 from MarcZX100/codex/carry-pthread-atfork-3628 2026-10-14 05:54:54 +13:00
KernelErrors.hpp refactor(kernel): share SCE kernel error codes through KernelErrors.hpp 2026-09-27 13:32:28 +07:00
Unimplemented.cpp feat(libkernel): report the host SoC and CPU temperature 2026-10-13 16:30:07 +02:00