kernel: implement sceKernelUtimes #2579
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2579
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2579"
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?
@lordra9-svg on GitHub · 2026-11-27 02:00 UTC · original
lordra9-svg:fix/kernel-utimes→main· +116 −0 · 4 files · 1 commits · openAbiotic Factor (PPSA26012, #2163) and WUCHANG: Fallen Feathers
(PPSA09518, #541) import
sceKernelUtimesfromlibkernel_v1as NID0Cq8ipKr9n0; Returnal (PPSA01285) imports the same NID. The export was notregistered, so these games logged an unresolved-import stub.
Implement the FreeBSD/PS5 contract: validate microseconds before resolving
the path, report
EFAULTfor a null path,ENOENTfor an empty or unmappedpath and
EROFSfor a read-only mount.times[0]is the access time andtimes[1]the modification time; a nulltimessets both to the currenttime. Use
utimeson POSIX and_wutimeon Windows.Refs #2163, #541.
Tests
kernel_file_system_testspasses on61db2f88: export lookup, explicittimes, current-time mode, invalid microseconds and the path errors.
Files:
src/kernel/fileSystem.cpp,src/kernel/fileSystem.h,src/libs/libKernel.cpp,tests/KernelFileSystemTests.cpp.AI assistance
Drafted with AI assistance; I reviewed the change and ran the tests above.
@coderabbitai[bot] on GitHub · 2026-11-27 02:04 UTC · original
Walkthrough
The change adds and registers
KernelUtimes. The function validates paths and timestamp values, checks mount writability, and updates timestamps through the platform API. Tests cover timestamp updates, null timestamps, invalid microseconds, path errors, and fixture cleanup.Suggested reviewers:
nmzik,senaxx,neveshenryChange: Feature
Merge Risk:
Low · up to
da36dThis adds the missing sceKernelUtimes export so affected titles can resolve the import. On Windows, sub-second precision is lost and directory timestamp updates may fail. Guest-visible directory times from stat remain current-time by existing design. These are narrow gaps and the change is mergeable with owner awareness.
Pre-merge checks:
4
Full details: Title check
Explanation
The title "kernel: implement sceKernelUtimes" matches the main change: the PR adds the sceKernelUtimes export (KernelUtimes in fileSystem.cpp/.h, registered in libKernel.cpp) with its tests. It is short and specific, and it names the API.
Full details: Description check
Explanation
The description states which games import the NID, the FreeBSD/PS5 error contract (EFAULT, ENOENT, EROFS, EINVAL ordering), the times[0]/times[1] semantics, the POSIX and Windows calls, and the test run. These match the raw summary's changes to fileSystem.cpp, fileSystem.h, libKernel.cpp, and the new TestUtimes test.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
@ -1454,0 +1490,4 @@values.modtime = static_cast<time_t>(times[1].tv_sec);native_times = &values;}result = ::_wutime(real_name.wstring().c_str(), native_times);@coderabbitai[bot] on GitHub · 2026-11-27 02:04 UTC · original
Support writable directories on Windows.
For an existing writable directory such as
/savedata0/dir, this call returnsEACCESbecause_wutimerejects directories. The function then returnsKERNEL_ERROR_EACCESfor an otherwise valid timestamp update. This also affects null-times calls. (learn.microsoft.com)Use a directory-capable backend, such as
SetFileTimewith a directory handle. Preserve regular-file updates and test explicit-time and current-time directory updates. (learn.microsoft.com)@coderabbitai[bot] on GitHub · 2026-11-27 02:04 UTC · original · reviewed
Actionable comments posted: 1
1569f2c8-973b-4618-af59-322612115f98Reviewing files that changed from the base of the PR and between
61db2f8874andda36d053cc.src/kernel/fileSystem.cppsrc/kernel/fileSystem.hsrc/libs/libKernel.cpptests/KernelFileSystemTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.