Commit Graph
12 Commits
Author SHA1 Message Date
Dean fc3a5af62c Merge pull request #10755 from Ragbie/fix/windows-fclose-descriptor-state
fix(libc): drop the kernel state of a descriptor that fclose or freopen closes
2026-11-02 23:24:14 +13:00
Adrià ac26e59d9a Merge pull request #13901 from DeveshB-1/fix/stat-archived-efault
fix(libkernel): return EFAULT from stat for an unwritable buffer
2026-11-01 15:13:30 +01:00
DeveshB-1 b5ffde4a0a fix(libkernel): return EFAULT from stat for an unwritable buffer 2026-11-01 14:18:08 +05:30
ntamas94andClaude Opus 5.5 da7581eec4 fix(libkernel): report a 64 KiB st_blksize for directories
A PS4 Pro (firmware 10.71) reports st_blksize 0x10000 from stat and fstat
for /app0, its subdirectories and the system library directory. Titles
size one getdents buffer from it: CUSA18659's CryPak reads st_blksize +
264 bytes once, so the 512 reported here cut its shader directory listing
short. Directories, app0.zar ones included, now report 0x10000; /data
directories (0x8000 on the console) and files are recorded as debt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 15:17:34 +01:00
Evrim Cicek 92f4276f28 test(libc): cover a directory descriptor that fclose closes 2026-10-26 16:41:30 +03:00
qpavyros bebe28593d fix(libkernel): preserve native directory metadata 2026-10-26 01:33:46 +02:00
qpavyros 6105be4431 merge: sync archive directories with main 2026-10-26 01:10:12 +02:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
qpavyros 0a64d23bdf feat(libkernel): enumerate archived app directories
Squashed onto current main, resolving the fchflags/fstatfs conflict with the kqueue guards.
2026-10-24 20:18:05 +02:00
orezraeyandClaude Opus 5.5 2730b6abe5 fix(libkernel): match the AIO batch, priority and parameter limits to PS5
Measured on firmware 13.60: submits take 1 to 128 requests at priority
1 to 3, the id lists of poll, wait, cancel and delete take 1 to 128 ids,
wait takes mode 1 or 2, and sceKernelAioSetParam takes a window and a
delayed count of 0 to 128, a split flag of 0 or 1 and, with split on,
split and chunk sizes of 1 to 0x1000000; everything else returns EINVAL
without writing. sceKernelAioInitializeParam writes the console's three
default scheduling structs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 16:57:51 -03:00
Alexej Szpevák d97d6efb1b fix(libkernel): refuse descriptor calls on app0.zar files
flock, fstatfs, ftruncate, fsync, fdatasync, getdirentries, fchmod, futimes and mmap on an archived descriptor acted on its null device and succeeded or failed with an unrelated errno. They now throw NotImplemented, each covered by the kernel archive test; mmap is noexcept, so its refusal is checked through the terminate handler.
2026-10-16 20:03:32 +02:00
Alexej Szpevák 9b911ed510 feat(libkernel): serve app0.zar files through the file calls
sceKernelOpen and open give an archived file a read-only null-device descriptor. Reads, positioned, vectored and AIO reads, seeks, fstat and FIONREAD are served from the archive; dup, dup2 and F_DUPFD share the position. sceKernelStat and sceKernelCheckReachability see archived paths.

Writing opens fail with EROFS, O_CREAT|O_EXCL with EEXIST and O_DIRECTORY on a file with ENOTDIR. Opening an archived directory or one merged with the disk throws until getdents can list it.
2026-10-16 20:03:32 +02:00