IOCTL_USB_DISCONNECT, right or wrong track?
A call to this function of libusb in linux.c
int usb_detach_kernel_driver_np(usb_dev_handle *dev, int interface)
{
struct usb_ioctl command;
int ret;
command.ifno = interface;
command.ioctl_code = IOCTL_USB_DISCONNECT;
command.data = NULL;
printf ("****** Attempt to detach interface %d --> ", interface);
ret = ioctl(dev->fd, IOCTL_USB_IOCTL, &command);
with interface 0
makes the device /dev/sr1 (Displaylink CD) disappear.
Unfortunately, it has very strange side effects: my main desktop monitor shows pixelated garbage, Cinnamon crashes, session logout.
|