mirror of
https://github.com/neokuze/ps5-rust.git
synced 2026-10-29 04:02:20 +01:00
The SDK libc.a's syscalls.o stubs (mov $N,%rax; syscall; ret) never check the carry flag, so a failing call returns the errno value as a result: openat "returned" fd 2 for ENOENT, unlinkat "succeeded". std linked dup, openat and unlinkat from there. - ps5-std-rt/build.rs: disassembles the installed SDK's syscalls.o and generates all 232 stubs (fstatat excluded, it's ours) with the same numbers plus `jb __ps5_cerror` (errno + -1); any stub with another shape stops the build. Drops syscalls.o from the patched libc copy, which no longer needs the fstatat rename. - std-examples/err_probe: provokes failures (bad fds, missing paths, refused connect, port in use) via libc and std, port 9960. Tested on CFI-1215A, fw 13.60: all errors reported as -1 + errno; the SDK-style stub returns 2. faccessat/readlinkat give ENOSYS from the PS5 kernel itself. fs_probe and https_probe unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
245 B
TOML
11 lines
245 B
TOML
[package]
|
|
name = "err_probe"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[dependencies]
|
|
ps5 = { path = "../../crates/ps5", features = ["notify"] }
|
|
ps5-std-rt = { path = "../../crates/ps5-std-rt" }
|