Repository navigation
Conversation
sharkwouter
left a comment
There was a problem hiding this comment.
Could you still clean up the commit history and the files in this one still? It still looks a bit unfinished.
bd032c4 to
b45ad24
Compare
|
@sharkwouter Thanks for the review. I've cleaned this up and force-pushed the rewritten branch (
Would you mind taking another look at the revised, smaller diff? Thanks! |
Free scandir results after successful enumerations, preserve dangling symbolic links via lstat, clear released directory pointers, and return the correct HostFS DREAD reply command. Add a native C regression test for enumeration, replies and repeated open/close. Fixes #57.
b45ad24 to
c231b89
Compare
|
I've split this PR into four independently reviewable changes, preserving this PR's original discussion and reviews:
The original combined commit The extracted PSP PRs build independently with the PSP toolchain; the Mac host PR and the directory-only PR also build, and the directory regression test passes at 5,000 iterations. Thanks for reviewing the smaller, independently mergeable changes. The unrelated long-idle investigation stays in #74. |
Scope
This PR now contains only the HostFS directory fixes, independently reviewable and mergeable into
master:HOSTFS_CMD_DREADrather thanHOSTFS_CMD_READin aDREADresponse.scandir()entries on successful directory enumeration (not just on errors), preventing allocation leaks during repeated directory opens.lstat()so dangling symbolic links remain visible as directory entries.DREADwire response, dangling symlinks, and repeated open/close cycles.Fixes #57.
Verification
make -C tests test— passed on macOS.HOSTFS_TEST_ITERATIONS=5000 make -C tests test— passed.make -C usbhostfs_pc -j4— passed with only the pre-existing unrelatednewpathlenwarning.git diff --check— passed.Other independent fixes split out of the original PR
The original combined PR commit (
b45ad24) was preserved in a local backup branch before narrowing this PR. All four independent patches together reproduce the exact same Git tree as the original combined PR.Out of scope
The intermittent multi-hour USB/
pspshhang is tracked separately in #74. Neither this directory PR nor the three extracted fixes alone claims to resolve the root cause. Experimental wake-recovery work is not part of these PRs.