Repository navigation
feat(libkernel_sys): implement openat - #3968
Merged
oneandonlydean merged 1 commit intoOct 12, 2026
Merged
Conversation
10 tasks done
This was referenced Oct 11, 2026
babyhuey
force-pushed
the
feat/libkernel_sys-openat
branch
from
October 11, 2026 22:00
87c5dd9 to
5bb1c0c
Compare
babyhuey
force-pushed
the
feat/libkernel_sys-openat
branch
from
October 11, 2026 22:03
5bb1c0c to
c154b8b
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
This was referenced Oct 11, 2026
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Exports
openat(A8Yk5AhNDck) from libkernel_sys, the module titles import it from.AT_FDCWD(-100) and absolute paths go toopen, so guest path aliases, case-insensitive matching and the guest root apply as before.fchdirdoes it (feat(libkernel_sys): implement fchdir #3392): the recorded path on Windows, the/proc/self/fdlink on Linux. It returnsEBADFfor a descriptor that is not open andENOTDIRfor one that is not a directory.modeis read from the variadic arguments only withO_CREAT, as_opendoes, including the SysVva_liston Windows.sceKernelOpenafter path resolution is moved into a staticOpenNativewith no change in behaviour. libkernel also gets a smallOpenInDirectory_nid_no_patchhelper.fchdirlists the limits. A path relative to a descriptor does not go through aliases or case-insensitive matching, and a..component is not kept inside the guest root. As inopen,O_NOFOLLOWandO_NONBLOCKare ignored.ProsperoTV (PPSA99003, catalog 01.000.060) opens a directory with
O_DIRECTORY | O_NOFOLLOW, thenopenats entries in it withO_NONBLOCK | O_NOFOLLOW. Onmain12c2266 it stops atopenat; tracked in #1578:app.elf: symbol lookup error: app.elf: undefined symbol: A8Yk5AhNDck (openat)FAIL: unresolved ELF import A8Yk5AhNDck (openat) from libkernel_sys.prxpollafter opening/dev/crypto(Linux:poll: descriptor 6 is not a socket; Windows:poll: descriptor 4 is not a socket). feat(libkernel): poll on file descriptors and Windows pipe read ends #3649 fixes that.Vulkan device ready, then stops at the headlessDisplayWindow. Windows renders, then stops atAGC graphics: last provoking vertex with explicit per-vertex flat interpolation is unsupported(AGC: five homebrew titles stop on 'last provoking vertex with explicit per-vertex flat interpolation is unsupported' #3581). That is a graphics gap, not an import.Tested
Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release:
guest_kernel_syspasses 5/5 (--repeat until-fail:5) on both. There are no new warnings inOpen.cpp,libkernel_sys/Export.cpporGuestKernelSys.cpp. The new cases cover:O_CREAT | O_EXCLand mode0644, thenEEXISTon a second tryENOENTfor a missing nameAT_FDCWDwith a relative pathENOTDIRfor a file descriptor,EBADFfor -1EFAULTfor a null path andENOENTfor an empty oneWith #3649 stacked,
guest_pollalso passes 5/5 on Windows.check_conventions.pypasses. Rebased ontomain51e2c51, over #3485 (sceKernelOpennow resolves throughResolvePathError_nid_no_patchbeforeOpenNative) and #3685 (libkernel_sys errno constants):guest_kernel_sys5/5 on both and the same ProsperoTV results. Windows ran with #4021 stacked, sincemaindoes not build on Windows without it.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)