Skip to content

feat(kernel): implement file metadata ops and address conversion - #169

Merged
boykopovar merged 1 commit into
boykopovar:mainfrom
asimplestray:feat/kernel-file-ops
Sep 30, 2026
Merged

boykopovar merged 1 commit into
boykopovar:mainfrom
asimplestray:feat/kernel-file-ops

Conversation

@asimplestray

@asimplestray asimplestray commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements 6 generic libkernel entry points:

  • sceKernelChmod -> existing chmod alias; sceKernelFtruncate -> existing ftruncate alias (File/src/Stdio.cpp).
  • sceKernelTruncate (resize_file, SceError returns like sceKernelRename), sceKernelUtimes (utimes/_wutime, SceError returns).
  • inet_ntop / inet_pton -> existing __inet_ntop / __inet_pton (Socket/src/Socket.cpp).
  • Removes the duplicate rename_nid_postfix stub from libkernel/Unimplemented.cpp: the working errno-style implementation already lives in libc and the stub shadowed it at link time once the filesystem test links both libraries.

Rebased on current main: sceKernelFsync (previously in this PR) is now upstream's, and the Apr*Submit/Wait + shutdown stubs removed here as duplicates of newly merged implementations.

Tested

Linux (GCC, BUILD_TESTING=ON, ANYPS5_ENABLE_SPIRV_TOOLS=OFF): full build, ctest 70/70 pass, including extended guest_filesystem (chmod, truncate shrink+content, missing-file code, utimes-to-now, fsync+ftruncate on a real descriptor) and extended guest_udp (v4/v6 pton+ntop round trips, bad family, bad text, short buffer). Patched libkernel.prx exports all 6 NIDs (verified with nm -D).

Checklist

  • Based on current main; no other open PR implements the same functions (checked open PRs: none touch these)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (no new stubs)
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Progress report (f881e02 → a4e755c)

📈 System libraries: 75.31% (+0.23%, +6 implemented, -1 removed functions)

✅ 6 implemented
Library Name
libkernel inet_ntop_nid_postfix
libkernel inet_pton_nid_postfix
libkernel sceKernelChmod_nid_postfix
libkernel sceKernelFtruncate
libkernel sceKernelTruncate_nid_postfix
libkernel sceKernelUtimes_nid_postfix
🗑️ 1 removed
Library Name
libkernel rename_nid_postfix

oneandonlydean added a commit to oneandonlydean/AnyPS5 that referenced this pull request Sep 30, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Sep 30, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Sep 30, 2026
@boykopovar
boykopovar merged commit c3aed31 into boykopovar:main Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants