| 181 |
|
|
| 182 |
#ifdef USBDEVFS_DISCONNECT |
#ifdef USBDEVFS_DISCONNECT |
| 183 |
/* earlier Linux 2.4 do not support that */ |
/* earlier Linux 2.4 do not support that */ |
| 184 |
ret = ioctl(fd, USBDEVFS_DISCONNECT); |
{ |
| 185 |
if (ret < 0 && errno != ENODATA) { |
struct usbdevfs_ioctl ctrl; |
| 186 |
perror("USBDEVFS_DISCONNECT"); |
ctrl.ioctl_code = USBDEVFS_DISCONNECT; |
| 187 |
goto fail; |
ctrl.ifno = 0; |
| 188 |
|
ret = ioctl(fd, USBDEVFS_IOCTL, &ctrl); |
| 189 |
|
if (ret < 0 && errno != ENODATA) { |
| 190 |
|
perror("USBDEVFS_DISCONNECT"); |
| 191 |
|
goto fail; |
| 192 |
|
} |
| 193 |
} |
} |
| 194 |
#endif |
#endif |
| 195 |
|
|