Skip to content

Conversation

@hakanrw
Copy link
Contributor

@hakanrw hakanrw commented Jan 1, 2025

Currently, ioctl calls are failing, as __fioOpsInitializeImpl and __fileXioOpsInitializeImpl are checking for the wrong symbol when setting operation handlers.

Offending lines:

if (&_ioctl) __fio_fdman_ops_file.ioctl = __fioIoctlHelper;

if (&_ioctl) __fileXio_fdman_ops_file.ioctl = __fileXioIoctlHelper;

_ioctl is not defined anywhere, thus x_ops_file.ioctl will remain as NULL. This in turn will result in an ENOSYS in _ps2sdk_ioctl. The correct symbol to check here would be _ps2sdk_ioctl. I corrected the error, and defined _ioctl in glue.c for consistency.

Tested and validated via PCSX2 emulator.

@uyjulian
Copy link
Member

uyjulian commented Jan 3, 2025

Thanks!

@uyjulian uyjulian merged commit 8367a37 into ps2dev:master Jan 3, 2025
3 checks passed
362053534 pushed a commit to 362053534/ps2sdk that referenced this pull request Aug 3, 2025
fix ioctl failing with ENOSYS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants