View | Details | Raw Unified | Return to bug 212845 | Differences between
and this patch

Collapse All | Expand All

(-)src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp (-7 / +17 lines)
Lines 153-158 int USBProxyBackendFreeBSD::releaseDevic Link Here
153
}
153
}
154
154
155
155
156
bool USBProxyBackendFreeBSD::isFakeUpdateRequired()
157
{
158
    return true;
159
}
160
161
156
int USBProxyBackendFreeBSD::wait(RTMSINTERVAL aMillies)
162
int USBProxyBackendFreeBSD::wait(RTMSINTERVAL aMillies)
157
{
163
{
158
    return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000);
164
    return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000);
Lines 270-277 PUSBDEVICE USBProxyBackendFreeBSD::getDe Link Here
270
                break;
276
                break;
271
            }
277
            }
272
278
273
            pDevice->enmState           = USBDEVICESTATE_UNUSED;
279
            pDevice->enmState           = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
274
            pDevice->bBus               = UsbDevInfo.udi_bus;
280
            pDevice->bBus               = UsbDevInfo.udi_bus;
281
            pDevice->bPort              = UsbDevInfo.udi_hubport;
275
            pDevice->bDeviceClass       = UsbDevInfo.udi_class;
282
            pDevice->bDeviceClass       = UsbDevInfo.udi_class;
276
            pDevice->bDeviceSubClass    = UsbDevInfo.udi_subclass;
283
            pDevice->bDeviceSubClass    = UsbDevInfo.udi_subclass;
277
            pDevice->bDeviceProtocol    = UsbDevInfo.udi_protocol;
284
            pDevice->bDeviceProtocol    = UsbDevInfo.udi_protocol;
Lines 292-319 PUSBDEVICE USBProxyBackendFreeBSD::getDe Link Here
292
                    pDevice->enmSpeed = USBDEVICESPEED_HIGH;
299
                    pDevice->enmSpeed = USBDEVICESPEED_HIGH;
293
                    break;
300
                    break;
294
                case USB_SPEED_SUPER:
301
                case USB_SPEED_SUPER:
302
                    pDevice->enmSpeed = USBDEVICESPEED_SUPER;
303
                    break;
295
                case USB_SPEED_VARIABLE:
304
                case USB_SPEED_VARIABLE:
305
                    pDevice->enmSpeed = USBDEVICESPEED_VARIABLE;
306
                    break;
296
                default:
307
                default:
297
                    pDevice->enmSpeed = USBDEVICESPEED_UNKNOWN;
308
                    pDevice->enmSpeed = USBDEVICESPEED_UNKNOWN;
309
                    break;
298
            }
310
            }
299
311
300
            if (UsbDevInfo.udi_vendor[0] != '\0')
312
            if (UsbDevInfo.udi_vendor[0] != '\0')
301
            {
313
            {
314
                USBLibPurgeEncoding(UsbDevInfo.udi_vendor);
302
                pDevice->pszManufacturer = RTStrDupN(UsbDevInfo.udi_vendor, sizeof(UsbDevInfo.udi_vendor));
315
                pDevice->pszManufacturer = RTStrDupN(UsbDevInfo.udi_vendor, sizeof(UsbDevInfo.udi_vendor));
303
                USBLibPurgeEncoding(pDevice->pszManufacturer);
304
            }
316
            }
305
317
306
            if (UsbDevInfo.udi_product[0] != '\0')
318
            if (UsbDevInfo.udi_product[0] != '\0')
307
            {
319
            {
320
                USBLibPurgeEncoding(UsbDevInfo.udi_product);
308
                pDevice->pszProduct = RTStrDupN(UsbDevInfo.udi_product, sizeof(UsbDevInfo.udi_product));
321
                pDevice->pszProduct = RTStrDupN(UsbDevInfo.udi_product, sizeof(UsbDevInfo.udi_product));
309
                USBLibPurgeEncoding(pDevice->pszProduct);
310
            }
322
            }
311
323
312
            if (UsbDevInfo.udi_serial[0] != '\0')
324
            if (UsbDevInfo.udi_serial[0] != '\0')
313
            {
325
            {
326
                USBLibPurgeEncoding(UsbDevInfo.udi_serial);
314
                pDevice->pszSerialNumber = RTStrDupN(UsbDevInfo.udi_serial, sizeof(UsbDevInfo.udi_serial));
327
                pDevice->pszSerialNumber = RTStrDupN(UsbDevInfo.udi_serial, sizeof(UsbDevInfo.udi_serial));
315
                USBLibPurgeEncoding(pDevice->pszSerialNumber);
328
                pDevice->u64SerialHash = USBLibHashSerial(UsbDevInfo.udi_serial);
316
                pDevice->u64SerialHash   = USBLibHashSerial(pDevice->pszSerialNumber);
317
            }
329
            }
318
            rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
330
            rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
319
            if (rc == 0)
331
            if (rc == 0)
Lines 321-327 PUSBDEVICE USBProxyBackendFreeBSD::getDe Link Here
321
333
322
            pDevice->pszAddress = RTStrDup(pszDevicePath);
334
            pDevice->pszAddress = RTStrDup(pszDevicePath);
323
            pDevice->pszBackend = RTStrDup("host");
335
            pDevice->pszBackend = RTStrDup("host");
324
            pDevice->enmState   = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
325
336
326
            usbLogDevice(pDevice);
337
            usbLogDevice(pDevice);
327
338
Lines 337-340 PUSBDEVICE USBProxyBackendFreeBSD::getDe Link Here
337
348
338
    return pDevices;
349
    return pDevices;
339
}
350
}
340

Return to bug 212845