feat(libkernel_sys): implement renameat #4877
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4877"
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 jagrat04 on 2026-10-13T01:23:14Z.
What
Implements FreeBSD/POSIX
renameatinlibkernel_sys.prx(NID3P7i3vxeZ18).EFAULTon null pointer paths andENOENTon empty paths.ENAMETOOLONGfor path lengths >= 1024 or components > 255.AT_FDCWD(-100) and absolute paths directly torename.GetDirectoryDescriptorPath_nid_no_patch, returningEBADFfor closed descriptors andENOTDIRfor non-directory descriptors..or..withEINVAL, prevents moving a directory into a subdirectory of itself (EINVAL), moving directory onto non-empty directory (ENOTEMPTY), moving file onto directory (EISDIR), and moving directory onto file (ENOTDIR).RecordWrittenPath_nid_no_patch.docs/dev/debt/libkernel_sys.md.Tested
core/libs/tests/GuestKernelSys.cppcovering:EFAULT) and empty paths (ENOENT)EBADF) and regular file descriptors (ENOTDIR)ENAMETOOLONG)EINVAL)ENOENT)EISDIR)ENOTDIR)EINVAL)ENOTEMPTY)ENOTDIR)AT_FDCWD(-100)guest_kernel_systest suite (100% tests passed).tools/check_conventions.py --base origin/main.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T01:23:34Z.
Progress report (
4899658→2a8e745)📈 System libraries: 88.28% (+0.01%, +1 implemented functions)
✅ 1 implemented
renameat_nid_postfixImported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-13T07:24:54Z.
Linux test (Arch, GCC 16.2.1, glibc, Release), this PR merged onto
main7e181fcc3together with #4927, #4903, #4877, #4822 and #4823 (no conflicts):guest_kernel_syspasses. With this PR's source change reverted (test kept),guest_kernel_sysfails on Linux, so the check guards the change on Linux too.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T08:18:38Z.
Rebased onto current
main(only adjacency conflicts with themkdiratblock, the error constants and the test declarations); build and the 24core/libstests pass locally, includingguest_kernel_sys. The new test fails to link without the change. Confirmed on Linux by @nicolasfalesy. The Windows-only branch (removing an empty destination directory beforerename) is covered by code review only. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T08:20:41Z.
Rebased onto current
mainagain (adjacency conflicts with the newunlinkatblock inExport.cppand indocs/dev/debt/libkernel_sys.md; both are kept). Build and the 24core/libstests pass locally, includingguest_kernel_sys. The Windows-only branch is covered by code review only. Merging once CI is green.