aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/virtualbox-ose
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-01-26 05:01:18 +0800
committerJung-uk Kim <jkim@FreeBSD.org>2017-01-26 05:01:18 +0800
commitb0bdf5622b59eaf4900bc752632cb9754a25554f (patch)
treedaf4a1815a0ecbdfe0d25e835b6eb368eba85f7d /emulators/virtualbox-ose
parentca7e23155c8766eb13b48577451280f7cfd05773 (diff)
downloadfreebsd-ports-gnome-b0bdf5622b59eaf4900bc752632cb9754a25554f.tar.gz
freebsd-ports-gnome-b0bdf5622b59eaf4900bc752632cb9754a25554f.tar.zst
freebsd-ports-gnome-b0bdf5622b59eaf4900bc752632cb9754a25554f.zip
Fix USB support.
PR: 212845 Submitted by: hselasky Tested by: Graham Menhennitt (graham at menhennitt dot com dot au)
Diffstat (limited to 'emulators/virtualbox-ose')
-rw-r--r--emulators/virtualbox-ose/Makefile2
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h13
-rw-r--r--emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp53
3 files changed, 62 insertions, 6 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index cb03b32d3d33..4ef4f7e91821 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -3,7 +3,7 @@
PORTNAME= virtualbox-ose
PORTVERSION= 5.1.14
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${PORTVERSION}/
DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h b/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
index e8020892adfa..d9f7fac8f083 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Main_include_USBProxyBackend.h
@@ -1,10 +1,17 @@
---- src/VBox/Main/include/USBProxyBackend.h.orig 2016-08-16 20:00:18 UTC
+--- src/VBox/Main/include/USBProxyBackend.h.orig 2017-01-17 07:27:19 UTC
+++ src/VBox/Main/include/USBProxyBackend.h
-@@ -365,7 +365,6 @@ protected:
+@@ -359,13 +359,10 @@ public:
+ virtual int releaseDevice(HostUSBDevice *aDevice);
+
+ protected:
+- int initUsbfs(void);
+- int initSysfs(void);
+ virtual int wait(RTMSINTERVAL aMillies);
virtual int interruptWait(void);
virtual PUSBDEVICE getDevices(void);
- int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc);
+- int addDeviceToChain(PUSBDEVICE pDev, PUSBDEVICE *ppFirst, PUSBDEVICE **pppNext, int rc);
- virtual void deviceAdded(ComObjPtr<HostUSBDevice> &aDevice, SessionMachinesList &llOpenedMachines, PUSBDEVICE aUSBDevice);
++ virtual bool isFakeUpdateRequired();
private:
RTSEMEVENT mNotifyEventSem;
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp
index b763c1a75860..30d58e39c899 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Main_src-server_freebsd_USBProxyBackendFreeBSD.cpp
@@ -1,6 +1,42 @@
---- src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp.orig 2016-08-16 20:00:20 UTC
+--- src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp.orig 2017-01-17 07:27:22 UTC
+++ src/VBox/Main/src-server/freebsd/USBProxyBackendFreeBSD.cpp
-@@ -299,21 +299,21 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+@@ -153,6 +153,12 @@ int USBProxyBackendFreeBSD::releaseDevic
+ }
+
+
++bool USBProxyBackendFreeBSD::isFakeUpdateRequired()
++{
++ return true;
++}
++
++
+ int USBProxyBackendFreeBSD::wait(RTMSINTERVAL aMillies)
+ {
+ return RTSemEventWait(mNotifyEventSem, aMillies < 1000 ? 1000 : 5000);
+@@ -270,8 +276,9 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+ break;
+ }
+
+- pDevice->enmState = USBDEVICESTATE_UNUSED;
++ pDevice->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
+ pDevice->bBus = UsbDevInfo.udi_bus;
++ pDevice->bPort = UsbDevInfo.udi_hubport;
+ pDevice->bDeviceClass = UsbDevInfo.udi_class;
+ pDevice->bDeviceSubClass = UsbDevInfo.udi_subclass;
+ pDevice->bDeviceProtocol = UsbDevInfo.udi_protocol;
+@@ -292,28 +299,33 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+ pDevice->enmSpeed = USBDEVICESPEED_HIGH;
+ break;
+ case USB_SPEED_SUPER:
++ pDevice->enmSpeed = USBDEVICESPEED_SUPER;
++ break;
+ case USB_SPEED_VARIABLE:
++ pDevice->enmSpeed = USBDEVICESPEED_VARIABLE;
++ break;
+ default:
+ pDevice->enmSpeed = USBDEVICESPEED_UNKNOWN;
++ break;
+ }
if (UsbDevInfo.udi_vendor[0] != '\0')
{
@@ -26,3 +62,16 @@
}
rc = ioctl(FileUsb, USB_GET_PLUGTIME, &PlugTime);
if (rc == 0)
+@@ -321,7 +333,6 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+
+ pDevice->pszAddress = RTStrDup(pszDevicePath);
+ pDevice->pszBackend = RTStrDup("host");
+- pDevice->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
+
+ usbLogDevice(pDevice);
+
+@@ -337,4 +348,3 @@ PUSBDEVICE USBProxyBackendFreeBSD::getDe
+
+ return pDevices;
+ }
+-