View Single Post
Old 08-06-2016, 06:44 PM   #4
Jim2220
Junior Member
 
Join Date: Nov 2015
Posts: 11
Default 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.
Jim2220 is offline   Reply With Quote