fix(libSceSystemService): answer the shell core free size calls with the host's disk space #16787
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16787"
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 xXPBSXx on 2026-11-07T16:26:21Z.
What
sceShellCoreUtilGetFreeSizeOfUserPartitionandsceShellCoreUtilGetFreeSizeOfAvContentsTmpthrew as unimplemented. On a PS5 the first returns 0 with a non-zero free and total size and the second returns a non-zero size. They now return the available and total bytes of the host disk that holds the working directory (the partition call) and the available bytes (the other call). The exact values, the units and what the partition covers were not measured, and the debt entry says so. No title checked calls these functions.Tested
Measured on a PS5 with firmware 11.60 (
kernel_get_fw_version0x11600005), from a homebrew payload process (ps5-payload-sdk v0.45, elfldr), on 2026-11-06 at 17:49 UTC and 18:19 UTC (two runs, identical); the console's own clock read about 1 h 41 min more (see the first comment). Only zero versus non-zero was recorded. A title process may differ.mainbeforesceShellCoreUtilGetFreeSizeOfUserPartition(&free, &total)sceShellCoreUtilGetFreeSizeOfAvContentsTmp()The new test
guest_system_service_free_sizechecks the return value, that both sizes are non-zero and that free is not above total. On Ubuntu 24.04 under WSL2 with GCC 13.3.0 and an AddressSanitizer build, onmain2150294122the test commit alone aborts ("sceShellCoreUtilGetFreeSizeOfUserPartition not implemented"), and with the fix commit on the samemainit passes in 0.33 s. All 40guest_system_service*tests pass with this change when leak detection is off; with it on,guest_system_service_usb_storagereports a leak that this change does not touch.tools/check_conventions.py --base upstream/mainpasses.Overlap: the 14 other open pull requests that change
docs/dev/debt/libSceSystemService.md,PendingExports.cpp, the library'sCMakeLists.txtorGuestSystemServiceFreeSize.cppwere checked on 2026-11-07 between 16:05 UTC and 16:12 UTC againstmaindd00a9c54e(the base of this change is the older2150294122; it still merges without a conflict); two more (#12848 and #14330) have been merged. Five already conflict withmainwithout this change (#15947 and #8651 in the debt file, #16463, #14212 and #12315 in other files), and none conflicts only with this change. The other nine merge cleanly with and without it, among them #16546, which edits another entry of the debt file.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)AI-assisted (Claude Code).
🤖 Generated with Claude Code