feat(libSceUsbd): declare the device and handle calls for the no-device path #3847
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3847"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by 13hourstilliland on 2026-10-11T17:55:20Z.
What
Gives the 19 remaining
libSceUsbdstubs the argument lists of FreeBSD 11.4 libusb (libusb.h). The device list is always empty, so each call either rejects its arguments or throws:LIBUSB_ERROR_INVALID_PARAMreturn0x80240002.sceUsbdOpenandsceUsbdGetActiveConfigDescriptorthrow on a null device, which FreeBSD dereferences.The no-device approach is the one tarfouss3 took in the closed #2493; the behaviour here follows the FreeBSD sources linked in TechnicalDebt (libusb10.c, libusb10_desc.c, libusb10_io.c).
Tested
Linux (GCC 14.2):
guest_usbdcovers the null, accepted and unknown-pointer paths of every new call. It aborts on currentmain(sceUsbdOpen not implemented) and passes with this change.check_conventions.pypasses. Not tested with a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T17:55:44Z.
Progress report (
a11c8f7→33c6e82)📈 System libraries: 86.37% (+0.56%, +19 implemented functions)
✅ 19 implemented
sceUsbdAttachKernelDriversceUsbdCheckConnectedsceUsbdClaimInterfacesceUsbdClosesceUsbdControlTransfersceUsbdGetActiveConfigDescriptorsceUsbdGetBusNumbersceUsbdGetConfigDescriptorsceUsbdGetDeviceAddresssceUsbdGetDeviceDescriptorsceUsbdGetStringDescriptorsceUsbdKernelDriverActivesceUsbdOpensceUsbdRefDevicesceUsbdReleaseInterfacesceUsbdResetDevicesceUsbdSetConfigurationsceUsbdSubmitTransfersceUsbdUnrefDeviceImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:09:26Z.
Checked against the linked FreeBSD
libusb10.c,libusb10_desc.candlibusb10_io.c: every null branch matches (null-safe: bus number, address, ref, unref, close;LIBUSB_ERROR_INVALID_PARAM→0x80240002: descriptors, claim/release, configuration, reset, check-connected, kernel-driver calls, control/string transfer, submit).guest_usbdpasses on Linux and fails without the change;check_conventions.pypasses. Merging.