Repository navigation
feat(libkernel): implement lstat - #1624
Conversation
klosixgaming-arch
left a comment
There was a problem hiding this comment.
LGTM. Clean implementation of lstat following FreeBSD semantics with proper platform-specific handling - host lstat on Linux for correct symlink behavior, and NotImplemented_nid_no_patch for Windows symbolic links (since Windows has no CRT lstat). The test coverage is excellent - testing regular files, directories, missing/empty/null arguments, and on Linux specifically validating symlink vs stat differences (S_IFLNK mode bits, dangling symlinks succeeding with lstat but failing with stat, path-through-file ENOTDIR errors). Good addition to support EVO-PLAYER-PS5's import requirements.
|
The overlap bot correctly found that #1795 also adds |
4b9eb4e to
81204de
Compare
|
The linked fork CI run |
|
Titles that stop on
The "with this branch" build also had my other open PRs merged; only this branch exports |
|
Same two titles on Windows. Windows 11, RTX 3080, WinLibs GCC 15.2.0 r7, Release,
As on Linux, the second build also had my other open PRs merged; only this branch exports |
81204de to
1f5935a
Compare
|
First Windows run, since the description says it was only compiled with MinGW. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. #1624, #1628, #1633 and #1634 merged together onto
🤖 Addressed by Claude Code |
1f5935a to
02918a3
Compare
02918a3 to
903f50a
Compare
|
Checked on Linux (merged onto current |
What
Implements
lstat(DRGXpDDh8Ng) in libkernel. Part of #1578: PPSA99039 (EVO-PLAYER-PS5) imports it.PathErrorandResolvePath_nid_no_patchlikestat; a nullsbfails withEFAULT.lstat, so a symbolic link reportsS_IFLNKand its own size, and a dangling link succeeds. Errors map throughSceErrorFromErrno, soENOENTandENOTDIRreach the guest instead of the singleENOENTsceKernelStatreturns.lstat. Anything that is not a symbolic link is identical tostat; a symbolic link callsNotImplemented_nid_no_patch.File::FillLinkStatsits next toFillFileStatinNativeStat.cpp.Tested
Linux (Ubuntu 24.04, GCC 13, Release):
guest_filesystempasses with--repeat until-fail:3. It now checkslstaton a file, a directory, a missing path, an empty path, null arguments, and (Linux only) a link, a dangling link and a path through a file (ENOTDIR). The test fails when hostlstatis replaced bystat.check_conventions.pypasses. Windows: the changed files compile with MinGW-w64 GCC 13 (-Wall -Wextra -fsyntax-only); not run on Windows. No title run.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)