git: 8b07c8afd6ff - main - emulators/virtualbox-ose-additions: Remove devclass from DRIVER_MODULE on recent main.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Aug 2022 18:15:29 UTC
The branch main has been updated by jhb (doc, src committer):
URL: https://cgit.FreeBSD.org/ports/commit/?id=8b07c8afd6ff3bedf0d82ee1d7de17a2ec261866
commit 8b07c8afd6ff3bedf0d82ee1d7de17a2ec261866
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-08-22 18:14:48 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-08-22 18:14:48 +0000
emulators/virtualbox-ose-additions: Remove devclass from DRIVER_MODULE on recent main.
Reviewed by: madpilot
Differential Revision: https://reviews.freebsd.org/D35954
---
...Box-Additions-common-VBoxGuest-VBoxGuest-freebsd.c | 19 ++++++++++++++++---
...ch-src_VBox_Additions_freebsd_drm_vboxvideo__drm.c | 17 +++++++++++++++++
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c b/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
index 3e664127c272..8fd24bda91f1 100644
--- a/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
+++ b/emulators/virtualbox-ose/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
@@ -1,4 +1,4 @@
---- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2019-01-25 18:12:28 UTC
+--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2022-03-22 23:37:46 UTC
+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
@@ -45,6 +45,7 @@
#include <sys/uio.h>
@@ -202,7 +202,7 @@
* I/O control request.
*
* @returns depends...
-@@ -316,8 +227,12 @@ static int vgdrvFreeBSDClose(struct cdev *pDev, int fF
+@@ -316,8 +227,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long
static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd)
{
PVBOXGUESTSESSION pSession;
@@ -216,7 +216,7 @@
/*
* Deal with the fast ioctl path first.
*/
-@@ -512,12 +427,14 @@ int VBOXCALL VBoxGuestIDC(void *pvSession, uintptr_t u
+@@ -512,12 +427,14 @@ static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEv
static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEvents, struct thread *td)
{
@@ -275,3 +275,16 @@
vgdrvFreeBSDRemoveIRQ(pDevice, pState);
}
else
+@@ -782,8 +699,12 @@ static driver_t vgdrvFreeBSDDriver =
+ sizeof(struct VBoxGuestDeviceState),
+ };
+
++#if __FreeBSD_version >= 1400058
++DRIVER_MODULE(vboxguest, pci, vgdrvFreeBSDDriver, 0, 0);
++#else
+ static devclass_t vgdrvFreeBSDClass;
+
+ DRIVER_MODULE(vboxguest, pci, vgdrvFreeBSDDriver, vgdrvFreeBSDClass, 0, 0);
++#endif
+ MODULE_VERSION(vboxguest, 1);
+
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_drm_vboxvideo__drm.c b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_drm_vboxvideo__drm.c
new file mode 100644
index 000000000000..d4e5f3fc5a33
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_drm_vboxvideo__drm.c
@@ -0,0 +1,17 @@
+--- src/VBox/Additions/freebsd/drm/vboxvideo_drm.c.orig 2022-07-26 18:05:21 UTC
++++ src/VBox/Additions/freebsd/drm/vboxvideo_drm.c
+@@ -154,10 +154,14 @@ static driver_t vboxvideo_driver = {
+ sizeof(struct drm_device)
+ };
+
++#if __FreeBSD_version >= 1400058
++DRIVER_MODULE(vboxvideo, vgapci, vboxvideo_driver, 0, 0);
++#else
+ extern devclass_t drm_devclass;
+ #if __FreeBSD_version >= 700010
+ DRIVER_MODULE(vboxvideo, vgapci, vboxvideo_driver, drm_devclass, 0, 0);
+ #else
+ DRIVER_MODULE(vboxvideo, pci, vboxvideo_driver, drm_devclass, 0, 0);
++#endif
+ #endif
+ MODULE_DEPEND(vboxvideo, drm, 1, 1, 1);