feat(libc): implement utime for guest paths #1683

Closed
MarcZX10 wants to merge 1 commit from upstream-pr/1683 into main
MarcZX10 commented 2026-10-08 16:22:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-08T16:22:42Z.


What

Implement the utime import for guest paths, setting access and modification times at second precision. A null times pointer sets both times to the current time. The implementation handles Linux timestamps with utimensat and Windows timestamps with SetFileTime, maps filesystem errors to guest errno values, and records the write for the existing persistence path.

Tested

Linux: built guest_filesystem_tests and ran ctest --test-dir build -R '^guest_filesystem$' --output-on-failure (1/1 passed). The test checks explicit access/modification times, current-time behavior, null/empty paths, and a missing file. Conventions and git diff --check passed. Windows was not available in this environment.

Checklist

  • Based on current main; no other open PR implements the utime import
  • One topic per PR; follow-ups go in a new pull request
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4789755058 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1683). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-08T16:22:42Z. --- ### What Implement the `utime` import for guest paths, setting access and modification times at second precision. A null times pointer sets both times to the current time. The implementation handles Linux timestamps with `utimensat` and Windows timestamps with `SetFileTime`, maps filesystem errors to guest errno values, and records the write for the existing persistence path. ### Tested Linux: built `guest_filesystem_tests` and ran `ctest --test-dir build -R '^guest_filesystem$' --output-on-failure` (1/1 passed). The test checks explicit access/modification times, current-time behavior, null/empty paths, and a missing file. Conventions and `git diff --check` passed. Windows was not available in this environment. ### Checklist - [x] Based on current `main`; no other open PR implements the `utime` import - [x] One topic per PR; follow-ups go in a new pull request - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
oneandonlydean commented 2026-10-08 19:20:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T19:20:57Z.


No title reaches utime on main yet: the homebrew audit lists the import, but those titles stop earlier at other missing imports. Closing for now; reopen when it's a title's next stop on main, with the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6067338895 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1683#issuecomment-6067338895). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-08T19:20:57Z. --- No title reaches `utime` on main yet: the homebrew audit lists the import, but those titles stop earlier at other missing imports. Closing for now; reopen when it's a title's next stop on main, with the log line.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1683
No description provided.