feat(libkernel): carry chflags implementation #4379
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4379"
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 MarcZX10 on 2026-10-12T08:20:26Z.
What
Carries the
chflagsimplementation from issue #3632. It validates the guest path, reports missing and unsupported flag errors, rejectsSF_SNAPSHOT, and throws an explicit unsupported-host error when asked to set recognized BSD file flags that the host does not store.PPSA99420 reaches the
chflagsimport on currentmainnow that its earlier stops have merged (issue #1578). This PR carries onlychflags; the other calls from #3632 are separate changes.Tested
guest_filesystem_tests; CTestguest_filesystempassed 1/1.git diff --checkpassed on that earlier head.Checklist
main; no open PR implements the same functionchflagsImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T08:30:59Z.
Progress report (
0aa4cb1→b6a10e9)📈 System libraries: 88.16% (+0.01%, +1 implemented functions)
✅ 1 implemented
chflags_nid_postfixImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T08:41:54Z.
The PR description was corrected to use the template section headings (
### What,### Tested,### Checklist) and now passes the local conventions checker. The current hosted conventions result reflects the earlier body. Posting this update to trigger a fresh PR check against the corrected description.Imported from boykopovar/AnyPS5. Originally posted by reyani-dev on 2026-10-12T09:03:23Z.
Title path for this one, from a Windows run (catalog build,
maine013f8c9+ #3980 + #3893 + #3781):FAIL: unresolved ELF import ixrw0h2tWuI from libkernel.prx(chflags). With achflagsexport added, its next stop ismiQ1wVwSexE(getpriority, #4374).0x3C9100A) is the bundled CPython'sos.chflags(chflags($module, /, path, flags, follow_symlinks=True); thelchflagsbranch sits next to it). CPython'sshutil.copystatcallsos.chflags(dst, st.st_flags)when both exist, so anyshutil.copy2/copytreein a Kodi add-on reaches it.NativeStatzero-initialisesFileStat(*sb = FileStat{};) and nothing setsst_flags, so that call is alwayschflags(path, 0). That's the path this PR answers with 0 after the lookup.Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T14:39:34Z.
Rebase handoff — rebased onto current
main, authorship unchanged.One conflict in
Stdio.cpp, resolved by keeping both sides: main's newerFile::DuplicateFrom(the guest-socket descriptor duplication) and this PR'sLookupError+ chflags tables are independent additions at the same spot.TechnicalDebt.mdunioned.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesTo pick it up:
Head is
fdfdc9435.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T21:12:33Z.
The three pull requests this waited on are merged (#3980, #3893, #3781), so PPSA99420 reaches the
chflagsimport onmainnow. It conflicts withmainagain: please rebase (the branch blawesom posted above resolvesStdio.cpp; the debt entry now goes intodocs/dev/debt/), and I'll build and merge it.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:13:34Z.
Thanks. The PS5MC report confirms the chflags import stop and its next getpriority stop. I see the rebased handoff branch and its Linux test results; the PR head itself still conflicts with main. I will update the PR branch from current main before requesting the build and merge review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:37:10Z.
Rebased onto current
mainand resolved the debt-file conflict by keeping main's entries and adding thechflagsentry. The earlier dependencies (#3980, #3893 and #3781) are merged, so I removed them from the dependency list and recorded PPSA99420 (#1578) underUnblocks. The old Linux result predates this rebase; I have not rerun it, and the description now says that explicitly. This head is ready for the build/review you offered.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-13T10:42:07Z.
Windows validation with title evidence (Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs; basemain2a2a3dc6):71fbc3cemerges cleanly but does not compile on currentmain:Stdio.cpp:308:22: error: redefinition of 'constexpr const int GUEST_EOPNOTSUPP', becausemainalready hasstatic constexpr int GUEST_EOPNOTSUPP = 45;sincee99816e8(#4391); the rebase only needs to drop the PR's copy (same value). With that one line removed:guest_filesystem3/3; suite 688/689, the only failure beingpatched_libraries, which fails onmainitself until #5025; conventions andgit diff --checkpass.PS5MC (PPSA99420) relinked against that build: before,
FAIL: unresolved ELF import ixrw0h2tWuI from libkernel.prx(chflags); after,FAIL: unresolved ELF import miQ1wVwSexE from libkernel.prx(getpriority, #4374). Stacked with #4374 and #4383 (plus a one-line test fix on #4383, see there) the title goes on toFAIL: unresolved ELF import d7nUj1LOdDU from libkernel.prx(clock_settime, the last commit of my #3632 branch).Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T14:10:47Z.
Title run with this PR: Windows 11, MinGW GCC 15.2.0 (WinLibs), Release. Built on
main3faa9cb40merged with this PR and the other open PRs that the catalog titles below need (#4377, #4379, #4374, #4383, #3798, #4863, #4105, my #5013/#5061/#5078/#5098/#5009 and the carries #5183/#5186, plus screamm'schrootbranch from #3632); every title converted from its catalog release,eboot.binkept inapp0, 60 s runs.clock_settime) it loads;tools/import_audit.pylists no absent import. It then needs #5184, #5185 and #5186 to get through Kodi's start-up, after which Kodi creates its GUI and runs 90 s.Build problem at this head (
71fbc3ce6):core/libs/prx/libkernel/File/src/Stdio.cppdefinesstatic constexpr int GUEST_EOPNOTSUPP = 45;twice (lines 302 and 308), so GCC 15 stops withredefinition of 'constexpr const int GUEST_EOPNOTSUPP'. One of the two lines needs to go; I dropped line 308 locally for the run above.AI-assisted (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T19:05:45Z.
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.
main)core/libs/prx/libkernel/File/src/Stdio.cppL31Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T20:28:32Z.
The title-run report identified a duplicate
GUEST_EOPNOTSUPPdefinition inStdio.cpp; I removed the redundant definition in commitb6a10e91a.tools/check_conventions.py --base upstream/mainandgit diff --checkpass. I attempted a fresh Linux Release configure, but it stopped before compilation because this worktree's SDL2 submodule is uninitialized and the environment lacks XRandR development support. The hosted PR checks are running against this head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T20:46:54Z.
Follow-up verification on the pushed head
b6a10e91a: Linux x86-64, GCC 12.2, Ninja Release, fresh CMake configure with pinned submodules initialized. Theguest_filesystem_teststarget built successfully (includingStdio.cpp), andctest -R '^guest_filesystem$'passed (1/1). This closes the local compile/test gap noted in my earlier update.