feat(libkernel): implement fdatasync #1620
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1620"
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 babyhuey on 2026-10-08T15:03:33Z.
What
Implements
fdatasync(KIbJFQ0I1Cg) in libkernel. Part of #1578: PPSA99001 (ProsperoRadio) imports it.fdatasyncon Linux and_commiton Windows; host errors map throughSceErrorFromErrnolike the neighbouring calls.EINVALwhen open andEBADFotherwise, asfchmodandfutimesalready do (FreeBSDfdatasyncon a socket returnsEINVAL).Tested
Linux (Ubuntu 24.04, GCC 13, Release):
guest_filesystempasses with--repeat until-fail:3; it now checksfdatasyncon a file, a closed descriptor (Linux only, as forfutimes), an open socket and a closed socket. The test fails when the socket branch is removed.check_conventions.pypasses. Windows:Stdio.cppcompiles 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)Imported from boykopovar/AnyPS5. Originally posted by hikazey on 2026-10-08T17:25:13Z.
Windows run, since the description says it wasn't run there: Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7, the CI build), Release, configured like CI, Ryzen 9 5900X. This commit merged onto
main7995d657, which merges cleanly.guest_filesystemfdatasync_nid_postfix(_commitgets the guest socket descriptor), test keptSo the
_commitbranch works for a regular file on Windows, and the socket cases catch a missing socket check there too. The closed-descriptor case stays Linux-only, as the test has it.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-08T17:37:00Z.
Fork CI while the upstream run waits for approval: Build run, all jobs green on f63f4ff0 (Linux 466/466, Windows 457/457, relinker on Linux, macOS and Windows). It builds the branch head, not the merge with
main. Thanks @hikazey for the merged Windows run above.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T21:25:36Z.
Progress report (
54f28f2→6768210)📈 System libraries: 85.31% (+0.01%, +1 implemented functions)
✅ 1 implemented
fdatasync_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:50:42Z.
Checked on Linux: build and full ctest green (
guest_filesystemincluded), the NID matchesfdatasync, and the behaviour (fd closed → EBADF, socket → EINVAL) matches prosper. Windows_commitpath confirmed by @hikazey's run above. Merging.