fix(fa): align attach adapter pointer contracts #1031

Merged
coah80 merged 1 commits from agent/bittle/fa-adapter-contract-review into main 2026-10-03 03:22:47 +00:00
coah80 commented 2026-10-03 03:21:45 +00:00 (Migrated from github.com)

Follow-up to #1029: make FAAttach's local declaration and the pfstub_attach definition agree on FADrvTbl** drives and const void* NAND data.

Original r3/r4 are stored unchanged in PF_STUB_MESSAGE.object/data. The first is the NULL-terminated drive-pointer array; the second is an optional NAND parameter block whose word at +0x50 is forwarded as size, not an integer mode. PF_STUB_MESSAGE already declares both fields const void*; no header changes are needed.

Parent verification:

  • Full 43U all_source/report/progress/DOL passes
  • All 1027 allocated objects/relocations and complete report unchanged
  • FAAttach remains 125/125 exact; adapter remains 20/20 exact, both ctxdiff zero
  • Complete owned objects byte-identical; exact code/data and linkage measures preserved
  • Empty pools and advisory literal checks pass; zero string arguments, no string-behavior claim
  • Worktree/base-relative diff checks pass

Only three declaration/assignment lines change. Deeper PFVOL/notification declarations retain existing opaque/integer representations; this does not claim global type consistency. No percentage gain or linking-configuration change.

Base: cc94a7530c
Tested tree: cc1107a71a
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Fix pfstub_attach to take a const nand_data pointer instead of a mode integer

Aligns the attach adapter's signature with the implementation. pfstub_attach now accepts a const void pointer nand_data in both FAAttach.c and pfs_attach.c, and passes it directly into the PF_STUB_MESSAGE data field instead of converting a 32-bit mode value to a pointer.

Macroscope summarized 34042ba.

Follow-up to #1029: make FAAttach's local declaration and the pfstub_attach definition agree on FADrvTbl** drives and const void* NAND data. Original r3/r4 are stored unchanged in PF_STUB_MESSAGE.object/data. The first is the NULL-terminated drive-pointer array; the second is an optional NAND parameter block whose word at +0x50 is forwarded as size, not an integer mode. PF_STUB_MESSAGE already declares both fields const void*; no header changes are needed. Parent verification: - Full 43U all_source/report/progress/DOL passes - All 1027 allocated objects/relocations and complete report unchanged - FAAttach remains 125/125 exact; adapter remains 20/20 exact, both ctxdiff zero - Complete owned objects byte-identical; exact code/data and linkage measures preserved - Empty pools and advisory literal checks pass; zero string arguments, no string-behavior claim - Worktree/base-relative diff checks pass Only three declaration/assignment lines change. Deeper PFVOL/notification declarations retain existing opaque/integer representations; this does not claim global type consistency. No percentage gain or linking-configuration change. Base: cc94a7530c7c03027ada69dd55d7bf6be6a5eb54 Tested tree: cc1107a71a2ee9e50ebbf4e054630300881bf024 DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d No merge performed or requested by this author. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Fix `pfstub_attach` to take a const `nand_data` pointer instead of a mode integer > Aligns the attach adapter's signature with the implementation. `pfstub_attach` now accepts a const void pointer `nand_data` in both [FAAttach.c](https://github.com/coah80/wii-ipl/pull/1031/files#diff-ffc7e55c72f2148ce926313ca12f383252e07b3f54544345e3e856e04732e192) and [pfs_attach.c](https://github.com/coah80/wii-ipl/pull/1031/files#diff-cf25a57241963836ef245dbaff71e0423003f531e5cf5e2b67ca110a991f7b0e), and passes it directly into the `PF_STUB_MESSAGE` data field instead of converting a 32-bit mode value to a pointer. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 34042ba.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 03:22:45 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.