return (*ioctl_func) (fd, request, wdioctl);
}
- fprintf(stderr,"PID %d: ",getpid());
switch(request) {
case VERSION:
version = (struct version_struct*)(wdheader->data);
{
struct interrupt *it = (struct interrupt*)(wdheader->data);
- hexdump(wdheader->data, wdheader->size);
fprintf(stderr,"Handle: %lu, Options: %lx, ncmds: %lu, enableok: %lu, count: %lu, lost: %lu, stopped: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds, it->fEnableOk, it->dwCounter, it->dwLost, it->fStopped);
it->fEnableOk = 1;
ret = (*ioctl_func) (fd, request, wdioctl);
#else
if (usbdevice) {
- int iface;
-
if (!usb_devhandle)
usb_devhandle = usb_open(usbdevice);
-//MGMG
- ret = usb_claim_interface(usb_devhandle, iface);
+
+ /* FIXME: Select right interface! */
+ ret = usb_claim_interface(usb_devhandle, usbdevice->config[0].interface[usi->dwInterfaceNum].altsetting[usi->dwAlternateSetting].bInterfaceNumber);
+ if (!ret) {
+ ret = usb_set_altinterface(usb_devhandle, usi->dwAlternateSetting);
+ if (ret)
+ fprintf(stderr, "usb_set_altinterface: %d\n", ret);
+ } else {
+ fprintf(stderr, "usb_claim_interface: %d -> %d (%s)\n", usbdevice->config[0].interface[usi->dwInterfaceNum].altsetting[usi->dwAlternateSetting].bInterfaceNumber, ret, usb_strerror());
+ }
}
#endif
fprintf(stderr,"unique: %lu, interfacenum: %lu, alternatesetting: %lu, options: %lx\n", usi->dwUniqueID, usi->dwInterfaceNum, usi->dwAlternateSetting, usi->dwOptions);
{
struct interrupt *it = (struct interrupt*)(wdheader->data);
- hexdump(wdheader->data, wdheader->size);
fprintf(stderr,"Handle: %lu, Options: %lx, ncmds: %lu, enableok: %lu, count: %lu, lost: %lu, stopped: %lu\n", it->hInterrupt, it->dwOptions, it->dwCmds, it->fEnableOk, it->dwCounter, it->dwLost, it->fStopped);
#ifndef NO_WINDRVR