docs(libc): record fopen and freopen of directories as measured on a PS5 #10251
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10251"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by orezraey on 2026-10-23T15:43:10Z.
What
fopenandfreopenon directories, and the mode strings, measured on a retail PS5 (firmware 13.60) throughlibSceLibcInternal.sprxfrom a payload process. The source and console log are in this gist (pfopen).The debt entry said what the console's filesystems return for a directory stream was unverified. The console:
r,rb,rw), andfreadreturns its raw directory blocks for/dataand/system, or fails withEIOand sets the error indicator for/;freopenreopen a stream onto a directory in a read mode.AnyPS5 keeps failing a directory read with
EISDIR, since the host's directory blocks are not the console's, and on Windowsfreopenonto a directory still fails withEACCES; the entry now says both. The other answers already matched and gain tests:EEXISTforwxon an existing file,EINVALfor an unknown or empty mode,rwread asr.EISDIRfor a directory in a write or update mode andENOENTfor a missing file were already tested.Tested
Windows 11, MinGW (winlibs).
guest_filesystemcheckswx, the invalid modes andrw, and passes three runs in a row.tools/check_conventions.pypasses.tools/pr_overlap.pyreports only shared files.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)