Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb: don't error during a scan on linux when there are no usb hosts.
libiio scans via libusb when the usb backend is built in. For many embedded linux targets that support On The Go (OTG) the USB port can be configured as device or host. Sometimes, end users may want to scan for local devices when the OTG is configured as a device (and there aren't any USB hosts). The issue with this is libusb returns an error when there are not any hosts. So - on linux - catch that, and override the error handling. New functionality is when Linux's OTG USB is in device mode, usb scans can still take place. This fixes issue analogdevicesinc#925 (iio_attr -a fails on plutoSDR). Signed-off-by: Robin Getz <[email protected]>
- Loading branch information