fix(savedata): report a save's size as the mount that created it gave #5094
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5094"
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 bubblegg on 2026-10-13T11:21:53Z.
What
sceSaveDataDirNameSearchinfos andsceSaveDataGetMountInforeported every save asSAVE_DATA_BLOCKS_MAXblocks, all of them free. A save's size is now theblocksof thesceSaveDataMount3call that created it, kept beside the save in<dir>.blocks; a save without a kept size takes that of its next mount that names one, and otherwise keepsSAVE_DATA_BLOCKS_MAX. Free blocks are what the save's files leave of it, each file rounded up to 32 KiB blocks. Sort keys 2 (blocks) and 5 (free blocks) now sort by these values.sceSaveDataDeleteremoves the kept size. The technical debt entry is updated.PPSA09030 creates its saves with 96 blocks. While the search reported 32768, it discarded them and showed its first-start EULA on every start.
Tested
Windows 11, WinLibs GCC 16.1.0.
guest_savedata_searchfails onmain(an empty save must report all its blocks free) and passes with this change; the 15 save data tests pass. PPSA09030: the EULA no longer comes back and the trace shows the search followed by the mounts of both saves (the two saves made before this change were given their 96-block size by hand).Checklist
main; no other open PR implements the same functions (#4876 and #3950 change other lines ofsceSaveDataMount3)NotImplemented_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-13T14:08:13Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceSaveData.native/Export.cppL257, L327, L364-365Imported from boykopovar/AnyPS5. Originally posted by coltken95 on 2026-10-13T18:51:55Z.
Tested on Linux x86-64 (Release build), with
4b7a357bdmerged into main9d0a41d5a:guest_savedata_searchpasses.guest_savedata_searchfails.AI-assisted: yes (Claude Code)