feat(libkernel): implement sceKernelGetEventError #1464

Closed
mj-bellomo wants to merge 1 commit from upstream-pr/1464 into main
mj-bellomo commented 2026-10-08 08:11:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mj-bellomo on 2026-10-08T08:11:22Z.


sceKernelGetEventError returns the event's data as the error when EV_ERROR is set in its flags and 0 otherwise, as FreeBSD kqueue delivers a failed change. A null event throws like the other accessors.

Tested

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on:
  • AI-assisted:
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4783851220 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1464). Originally posted by [mj-bellomo](https://github.com/mj-bellomo) on 2026-10-08T08:11:22Z. --- sceKernelGetEventError returns the event's data as the error when EV_ERROR is set in its flags and 0 otherwise, as FreeBSD kqueue delivers a failed change. A null event throws like the other accessors. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> - [x] AI-assisted: <!-- yes / no -->
github-actions[bot] commented 2026-10-08 17:06:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T17:06:24Z.


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.

Pull request Conflicting files (lines on main) Same exports Same new files
#1638 docs/dev/TechnicalDebt.md L235
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6065047357 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1464#issuecomment-6065047357). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-08T17:06:24Z. --- <!-- pr-overlap --> 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**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1638 | `docs/dev/TechnicalDebt.md` [L235](https://github.com/boykopovar/AnyPS5/blob/b83e849f84a4b11dcb238c1ea36667c48fff7ecf/docs/dev/TechnicalDebt.md#L235) | | |
WifeInLantern commented 2026-10-09 07:50:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by WifeInLantern on 2026-10-09T07:50:11Z.


Heads-up: #950 (opened 2026-10-06) already implements sceKernelGetEventError with the same behaviour (data under EV_ERROR, else 0), has CI passing on Linux and Windows, and has had a review. I tested it on Windows and commented there. The maintainers will decide which to keep; this is only so you know about the overlap.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6076783322 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1464#issuecomment-6076783322). Originally posted by [WifeInLantern](https://github.com/WifeInLantern) on 2026-10-09T07:50:11Z. --- Heads-up: #950 (opened 2026-10-06) already implements `sceKernelGetEventError` with the same behaviour (`data` under `EV_ERROR`, else 0), has CI passing on Linux and Windows, and has had a review. I tested it on Windows and commented there. The maintainers will decide which to keep; this is only so you know about the overlap.
oneandonlydean commented 2026-10-09 08:54:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T08:54:16Z.


Closing: #950 already implements sceKernelGetEventError the same way. If a title reaches it on main, please add the ID and log line there.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6077698088 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1464#issuecomment-6077698088). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T08:54:16Z. --- Closing: #950 already implements `sceKernelGetEventError` the same way. If a title reaches it on main, please add the ID and log line there.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1464
No description provided.