git: b1d42f867ccf - main - emulators/virtualbox-ose-additions-legacy: 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:28 UTC
The branch main has been updated by jhb (doc, src committer):
URL: https://cgit.FreeBSD.org/ports/commit/?id=b1d42f867ccfa21cfa602fce2d5b3a811744149d
commit b1d42f867ccfa21cfa602fce2d5b3a811744149d
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-08-22 18:14:28 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-08-22 18:14:28 +0000
emulators/virtualbox-ose-additions-legacy: Remove devclass from DRIVER_MODULE on recent main.
Reviewed by: madpilot
Differential Revision: https://reviews.freebsd.org/D35953
---
...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-legacy/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
index c6eda2f9587d..931ff7e48f21 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c
@@ -1,4 +1,4 @@
---- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2020-05-13 19:37:01 UTC
+--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2020-07-09 16:50:06 UTC
+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
@@ -102,8 +102,6 @@ struct VBoxGuestDeviceState
struct resource *pIrqRes;
@@ -184,7 +184,7 @@
* I/O control request.
*
* @returns depends...
-@@ -301,8 +210,12 @@ static int vgdrvFreeBSDClose(struct cdev *pDev, int fF
+@@ -301,8 +210,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;
@@ -198,7 +198,7 @@
/*
* Deal with the fast ioctl path first.
*/
-@@ -497,12 +410,14 @@ int VBOXCALL VBoxGuestIDC(void *pvSession, uintptr_t u
+@@ -497,12 +410,14 @@ static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEv
static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEvents, struct thread *td)
{
@@ -257,3 +257,16 @@
vgdrvFreeBSDRemoveIRQ(pDevice, pState);
}
else
+@@ -753,8 +668,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-legacy/files/patch-src_VBox_Additions_freebsd_drm_vboxvideo__drm.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_drm_vboxvideo__drm.c
new file mode 100644
index 000000000000..95298253e34f
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/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 17:36:57 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);