[vbox-dev] [PATCH] Make FreeBSD build with SUPDRV_WITH_RELEASE_LOGGER

Ed Maste emaste at freebsd.org
Mon Sep 24 20:35:40 GMT 2012


It appears that some build infrastructure refactoring was done, but not
applied to the FreeBSD port. SVN r10662 added SUPDRV_WITH_RELEASE_LOGGER
to src/VBox/HostDrivers/Support/Makefile.kmk but not the Makefile that
is actually used by the FreeBSD build.

Also delete a log message attempted after the logging subsystem is
destroyed, and change RTR0Term to RTR0TermForced in the unload function
based on what I saw in the Linux driver.
---
This patch is against FreeBSD's 4.2.0 port.

 src/VBox/HostDrivers/Support/freebsd/Makefile         | 2 +-
 src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/VBox/HostDrivers/Support/freebsd/Makefile b/src/VBox/HostDrivers/Support/freebsd/Makefile
index 970ccb2..f116793 100644
--- a/src/VBox/HostDrivers/Support/freebsd/Makefile
+++ b/src/VBox/HostDrivers/Support/freebsd/Makefile
@@ -27,7 +27,7 @@

 KMOD = vboxdrv

-CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DDEBUG
+CFLAGS += -DRT_OS_FREEBSD -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DSUPDRV_WITH_RELEASE_LOGGER -DVBOX -DRT_WITH_VBOX -Iinclude -I. -Ir0drv -w -DVBOX_WITH_HARDENING -DVBOX_WITH_64_BITS_GUESTS -DDEBUG

 .if (${MACHINE_ARCH} == "i386")
  CFLAGS += -DRT_ARCH_X86
diff --git a/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c b/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
index bbc8b49..03df09e 100644
--- a/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
+++ b/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
@@ -195,11 +195,9 @@ static int VBoxDrvFreeBSDUnload(void)

     supdrvDeleteDevExt(&g_VBoxDrvFreeBSDDevExt);

-    RTR0Term();
+    RTR0TermForced();

     memset(&g_VBoxDrvFreeBSDDevExt, 0, sizeof(g_VBoxDrvFreeBSDDevExt));
-
-    Log(("VBoxDrvFreeBSDUnload: returns\n"));
     return VINF_SUCCESS;
 }

-- 
1.7.11.5




More information about the vbox-dev mailing list