diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp index 70b459e94da7..03027b3dc445 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp @@ -1,71 +1,87 @@ ---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2021-01-07 15:34:20 UTC +--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-04-11 12:02:56 UTC +++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp -@@ -67,8 +67,8 @@ +@@ -77,8 +77,8 @@ # include # include /* getpwuid */ # include -# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU) -# include /** @todo FreeBSD 9 should have this. */ +# if !defined(RT_OS_OS2) && !defined(RT_OS_HAIKU) +# include # endif # ifdef RT_OS_OS2 # include -@@ -528,7 +528,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) +@@ -535,7 +535,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) } -#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */ /* * Simple wrapper to work around compiler-specific va_list madness. */ -@@ -555,12 +555,6 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -562,12 +562,6 @@ static int vgsvcVMInfoWriteUsers(void) #ifdef RT_OS_WINDOWS rc = VGSvcVMInfoWinWriteUsers(&g_VMInfoPropCache, &pszUserList, &cUsersInList); -#elif defined(RT_OS_FREEBSD) - /** @todo FreeBSD: Port logged on user info retrieval. - * However, FreeBSD 9 supports utmpx, so we could use the code - * block below (?). */ - rc = VERR_NOT_IMPLEMENTED; - #elif defined(RT_OS_HAIKU) /** @todo Haiku: Port logged on user info retrieval. */ rc = VERR_NOT_IMPLEMENTED; -@@ -586,7 +580,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -593,7 +587,7 @@ static int vgsvcVMInfoWriteUsers(void) while ( (ut_user = getutxent()) && RT_SUCCESS(rc)) { -# ifdef RT_OS_DARWIN /* No ut_user->ut_session on Darwin */ +# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) /* No ut_user->ut_session on Darwin/FreeBSD */ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid); # else VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n", -@@ -621,7 +615,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -628,7 +622,7 @@ static int vgsvcVMInfoWriteUsers(void) } # ifdef VBOX_WITH_DBUS -# if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +# if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /* Not yet for Solaris. */ DBusError dbErr; DBusConnection *pConnection = NULL; int rc2 = RTDBusLoadLib(); -@@ -830,7 +824,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -837,7 +831,7 @@ static int vgsvcVMInfoWriteUsers(void) if ( fHaveLibDbus && dbus_error_is_set(&dbErr)) dbus_error_free(&dbErr); -# endif /* RT_OS_LINUX */ +# endif /* RT_OS_LINUX || RT_OS_FREEBSD */ # endif /* VBOX_WITH_DBUS */ /** @todo Fedora/others: Handle systemd-loginctl. */ -@@ -867,7 +861,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -874,7 +868,7 @@ static int vgsvcVMInfoWriteUsers(void) RTMemFree(papszUsers); endutxent(); /* Close utmpx file. */ -#endif /* !RT_OS_WINDOWS && !RT_OS_FREEBSD && !RT_OS_HAIKU && !RT_OS_OS2 */ +#endif /* !RT_OS_WINDOWS && !RT_OS_HAIKU && !RT_OS_OS2 */ Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList)); +@@ -1168,6 +1162,15 @@ static int vgsvcVMInfoWriteNetwork(void) + + RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported); + VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down"); ++ ++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */ ++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported); ++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name); ++ if (RT_SUCCESS(rc2)) ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name); ++ else ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL); ++# endif + + cIfsReported++; + } diff --git a/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp index 70b459e94da7..7a52a9103251 100644 --- a/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp +++ b/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp @@ -1,71 +1,87 @@ ---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2021-01-07 15:34:20 UTC +--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-10-16 14:25:31 UTC +++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp -@@ -67,8 +67,8 @@ +@@ -77,8 +77,8 @@ # include # include /* getpwuid */ # include -# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU) -# include /** @todo FreeBSD 9 should have this. */ +# if !defined(RT_OS_OS2) && !defined(RT_OS_HAIKU) +# include # endif # ifdef RT_OS_OS2 # include -@@ -528,7 +528,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) +@@ -573,7 +573,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) } -#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */ /* - * Simple wrapper to work around compiler-specific va_list madness. + * Simple wrappers to work around compiler-specific va_list madness. */ -@@ -555,12 +555,6 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -702,12 +702,6 @@ static int vgsvcVMInfoWriteUsers(void) #ifdef RT_OS_WINDOWS rc = VGSvcVMInfoWinWriteUsers(&g_VMInfoPropCache, &pszUserList, &cUsersInList); -#elif defined(RT_OS_FREEBSD) - /** @todo FreeBSD: Port logged on user info retrieval. - * However, FreeBSD 9 supports utmpx, so we could use the code - * block below (?). */ - rc = VERR_NOT_IMPLEMENTED; - #elif defined(RT_OS_HAIKU) /** @todo Haiku: Port logged on user info retrieval. */ rc = VERR_NOT_IMPLEMENTED; -@@ -586,7 +580,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -733,7 +727,7 @@ static int vgsvcVMInfoWriteUsers(void) while ( (ut_user = getutxent()) && RT_SUCCESS(rc)) { -# ifdef RT_OS_DARWIN /* No ut_user->ut_session on Darwin */ +# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) /* No ut_user->ut_session on Darwin/FreeBSD */ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid); # else VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n", -@@ -621,7 +615,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -749,7 +743,7 @@ static int vgsvcVMInfoWriteUsers(void) } # ifdef VBOX_WITH_DBUS -# if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +# if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /* Not yet for Solaris. */ DBusError dbErr; DBusConnection *pConnection = NULL; int rc2 = RTDBusLoadLib(); -@@ -830,7 +824,7 @@ static int vgsvcVMInfoWriteUsers(void) +@@ -1074,7 +1068,7 @@ static int vgsvcVMInfoWriteUsers(void) if ( fHaveLibDbus && dbus_error_is_set(&dbErr)) dbus_error_free(&dbErr); -# endif /* RT_OS_LINUX */ +# endif /* RT_OS_LINUX || RT_OS_FREEBSD */ # endif /* VBOX_WITH_DBUS */ - /** @todo Fedora/others: Handle systemd-loginctl. */ -@@ -867,7 +861,7 @@ static int vgsvcVMInfoWriteUsers(void) + /* Calc the string length. */ +@@ -1109,7 +1103,7 @@ static int vgsvcVMInfoWriteUsers(void) RTMemFree(papszUsers); endutxent(); /* Close utmpx file. */ -#endif /* !RT_OS_WINDOWS && !RT_OS_FREEBSD && !RT_OS_HAIKU && !RT_OS_OS2 */ +#endif /* !RT_OS_WINDOWS && !RT_OS_HAIKU && !RT_OS_OS2 */ Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList)); +@@ -1403,6 +1397,15 @@ static int vgsvcVMInfoWriteNetwork(void) + + RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported); + VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down"); ++ ++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */ ++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported); ++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name); ++ if (RT_SUCCESS(rc2)) ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name); ++ else ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL); ++# endif + + cIfsReported++; + } diff --git a/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp index 0c463e3d9923..a6b7c5d6285c 100644 --- a/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp +++ b/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp @@ -1,71 +1,87 @@ ---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-08-13 19:41:16 UTC +--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-10-17 08:52:40 UTC +++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp @@ -77,8 +77,8 @@ # include # include /* getpwuid */ # include -# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU) -# include /** @todo FreeBSD 9 should have this. */ +# if !defined(RT_OS_OS2) && !defined(RT_OS_HAIKU) +# include # endif # ifdef RT_OS_OS2 # include @@ -573,7 +573,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) } -#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */ /* * Simple wrappers to work around compiler-specific va_list madness. */ @@ -702,12 +702,6 @@ static int vgsvcVMInfoWriteUsers(void) #ifdef RT_OS_WINDOWS rc = VGSvcVMInfoWinWriteUsers(&g_VMInfoPropCache, &pszUserList, &cUsersInList); -#elif defined(RT_OS_FREEBSD) - /** @todo FreeBSD: Port logged on user info retrieval. - * However, FreeBSD 9 supports utmpx, so we could use the code - * block below (?). */ - rc = VERR_NOT_IMPLEMENTED; - #elif defined(RT_OS_HAIKU) /** @todo Haiku: Port logged on user info retrieval. */ rc = VERR_NOT_IMPLEMENTED; @@ -733,7 +727,7 @@ static int vgsvcVMInfoWriteUsers(void) while ( (ut_user = getutxent()) && RT_SUCCESS(rc)) { -# ifdef RT_OS_DARWIN /* No ut_user->ut_session on Darwin */ +# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) /* No ut_user->ut_session on Darwin/FreeBSD */ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid); # else VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n", @@ -749,7 +743,7 @@ static int vgsvcVMInfoWriteUsers(void) } # ifdef VBOX_WITH_DBUS -# if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +# if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /* Not yet for Solaris. */ DBusError dbErr; DBusConnection *pConnection = NULL; int rc2 = RTDBusLoadLib(); @@ -1074,7 +1068,7 @@ static int vgsvcVMInfoWriteUsers(void) if ( fHaveLibDbus && dbus_error_is_set(&dbErr)) dbus_error_free(&dbErr); -# endif /* RT_OS_LINUX */ +# endif /* RT_OS_LINUX || RT_OS_FREEBSD */ # endif /* VBOX_WITH_DBUS */ /* Calc the string length. */ @@ -1109,7 +1103,7 @@ static int vgsvcVMInfoWriteUsers(void) RTMemFree(papszUsers); endutxent(); /* Close utmpx file. */ -#endif /* !RT_OS_WINDOWS && !RT_OS_FREEBSD && !RT_OS_HAIKU && !RT_OS_OS2 */ +#endif /* !RT_OS_WINDOWS && !RT_OS_HAIKU && !RT_OS_OS2 */ Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList)); +@@ -1403,6 +1397,15 @@ static int vgsvcVMInfoWriteNetwork(void) + + RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported); + VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down"); ++ ++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */ ++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported); ++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name); ++ if (RT_SUCCESS(rc2)) ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name); ++ else ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL); ++# endif + + cIfsReported++; + } diff --git a/emulators/virtualbox-ose-additions-legacy/Makefile b/emulators/virtualbox-ose-additions-legacy/Makefile index e9067d5fd9b4..da59aef65d43 100644 --- a/emulators/virtualbox-ose-additions-legacy/Makefile +++ b/emulators/virtualbox-ose-additions-legacy/Makefile @@ -1,187 +1,187 @@ PORTNAME= virtualbox-ose DISTVERSION= 5.2.44 -PORTREVISION?= 8 +PORTREVISION?= 9 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/ PKGNAMESUFFIX?= -additions-legacy DISTNAME= VirtualBox-${DISTVERSION} MAINTAINER= vbox@FreeBSD.org COMMENT= VirtualBox additions for FreeBSD guests WWW= https://www.virtualbox.org/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 i386 BUILD_DEPENDS= yasm:devel/yasm \ kmk:devel/kBuild \ xsltproc:textproc/libxslt USES= compiler:c++11-lang cpe iconv kmod tar:bzip2 CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox USE_RC_SUBR= vboxguest vboxservice HAS_CONFIGURE= yes CONFIGURE_ARGS+= --disable-alsa \ --disable-docs \ --disable-libvpx \ --disable-opengl \ --disable-pulse \ --disable-python \ --disable-sdl-ttf \ --disable-xpcom CONFIGURE_ARGS+= --nofatal --with-gcc="${CC}" --with-g++="${CXX}" MAKE_JOBS_UNSAFE= yes CONFLICTS_INSTALL= virtualbox-ose-additions \ virtualbox-ose-additions-nox11 \ virtualbox-ose-additions-70 \ virtualbox-ose-additions-nox11-70 \ virtualbox-ose-additions-71 \ virtualbox-ose-additions-nox11-71 \ virtualbox-ose-additions-72 \ virtualbox-ose-additions-nox11-72 PATCHDIR= ${.CURDIR}/../${PORTNAME}-legacy/files EXTRACT_AFTER_ARGS= --exclude tools/*.x86 --exclude tools/*.amd64 --exclude Firmware PORTSCOUT= limit:^5\. WRKSRC= ${WRKDIR}/VirtualBox-${DISTVERSION} OPTIONS_DEFINE= DBUS DEBUG X11 OPTIONS_DEFINE_i386= PAE OPTIONS_DEFAULT= DBUS X11 OPTIONS_SUB= yes PAE_DESC= Build kernel modules for PAE-kernels DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CONFIGURE_OFF= --disable-dbus DEBUG_CONFIGURE_ON= --build-debug DEBUG_VARS= KMK_BUILDTYPE=debug DEBUG_VARS_OFF= KMK_BUILDTYPE=release X11_BUILD_DEPENDS= ${LOCALBASE}/include/xorg/compiler.h:x11-servers/xorg-server X11_RUN_DEPENDS= xrandr:x11/xrandr X11_USES= pkgconfig xorg X11_USE= XORG=x11,xcursor,xext,xorgproto,xmu,xrandr,xt X11_VARS= VBOX_WITH_X11=1 .include .if ${SLAVE_PORT} == no CONFLICTS_INSTALL+= virtualbox-ose-additions-nox11-legacy .else CONFLICTS_INSTALL+= virtualbox-ose-additions-legacy .endif VIDEODIR= ${PREFIX}/lib/xorg/modules/drivers INPUTDIR= ${PREFIX}/lib/xorg/modules/input VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/additions VBOX_SBINS= VBoxControl \ VBoxService \ mount_vboxvfs BUILD_WRKSRC= ${VBOX_BIN}/src KMK_ARCH= freebsd.${ARCH:S/i386/x86/} KMK_CONFIG+= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys .if ${PORT_OPTIONS:MX11} .else VBOX_WITH_X11= .endif .include .if ${COMPILER_TYPE} == clang .if ${COMPILER_FEATURES:Mlibc++} EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-src-VBox-Additions-x11-VBoxClient-Makefile.kmk .endif .endif post-patch: @${ECHO_CMD} 'VBOX_ONLY_ADDITIONS = 1' > ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_X11_ADDITIONS = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GCC_std = -std=c++11' >> ${WRKSRC}/LocalConfig.kmk .if ${COMPILER_TYPE} == clang @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -fno-merge-constants||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk .endif @${REINPLACE_CMD} -e 's|/usr/X11|${LOCALBASE}|g' \ ${WRKSRC}/src/VBox/Additions/x11/VBoxClient/display.cpp @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ ${WRKSRC}/src/VBox/Additions/common/crOpenGL/load.c \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${WRKSRC}/src/VBox/Additions/x11/vboxmouse/Makefile.kmk \ ${WRKSRC}/src/VBox/Additions/x11/vboxvideo/Makefile.kmk @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ ${WRKSRC}/configure .if empty(ICONV_LIB) @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk \ ${WRKSRC}/src/VBox/Additions/x11/VBoxClient/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${PORT_OPTIONS:MPAE} @${ECHO_CMD} 'VBOX_FREEBSD = -DPAE' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${OSVERSION} >= 1500038 @${ECHO_CMD} 'HAVE_MNTOPTS_IN_LIBUTIL = 1' >> \ ${WRKSRC}/LocalConfig.kmk .endif post-patch-X11-on: @${ECHO_CMD} 'VBOX_USE_SYSTEM_XORG_HEADERS = 1' >> \ ${WRKSRC}/LocalConfig.kmk pre-build: cd ${WRKSRC} && ${SH} -c \ ". env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk" do-install: ${MKDIR} ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko \ ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/vboxvfs.ko ${STAGEDIR}${KMODDIR} ${INSTALL_LIB} ${VBOX_BIN}/pam_vbox.so ${STAGEDIR}${PREFIX}/lib ${INSTALL_PROGRAM} ${VBOX_SBINS:S|^|${VBOX_BIN}/|} \ ${STAGEDIR}${PREFIX}/sbin/ do-install-X11-on: ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_SCRIPT} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${STAGEDIR}${PREFIX}/bin/VBoxClient-all # X11 autostart ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ # KDE autostart ${MKDIR} ${STAGEDIR}${PREFIX}/share/autostart/ ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${STAGEDIR}${PREFIX}/share/autostart/ ${MKDIR} ${STAGEDIR}${VIDEODIR} ${INSTALL_DATA} ${VBOX_BIN}/vboxvideo_drv_system.so \ ${STAGEDIR}${VIDEODIR}/vboxvideo_drv.so ${MKDIR} ${STAGEDIR}${INPUTDIR} ${INSTALL_DATA} ${VBOX_BIN}/vboxmouse_drv_system.so \ ${STAGEDIR}${INPUTDIR}/vboxmouse_drv.so .include diff --git a/emulators/virtualbox-ose-additions-nox11-legacy/Makefile b/emulators/virtualbox-ose-additions-nox11-legacy/Makefile index c02115f2eb3b..7fef05133b84 100644 --- a/emulators/virtualbox-ose-additions-nox11-legacy/Makefile +++ b/emulators/virtualbox-ose-additions-nox11-legacy/Makefile @@ -1,8 +1,8 @@ -PORTREVISION= 7 +PORTREVISION= 9 PKGNAMESUFFIX= -additions-nox11-legacy MASTERDIR= ${.CURDIR}/../virtualbox-ose-additions-legacy OPTIONS_EXCLUDE= DBUS DEBUG OPENGL X11 .include "${MASTERDIR}/Makefile" diff --git a/emulators/virtualbox-ose-additions-nox11/Makefile b/emulators/virtualbox-ose-additions-nox11/Makefile index be1a45194f0a..a13626bde395 100644 --- a/emulators/virtualbox-ose-additions-nox11/Makefile +++ b/emulators/virtualbox-ose-additions-nox11/Makefile @@ -1,8 +1,8 @@ -PORTREVISION= 1 +PORTREVISION= 3 PKGNAMESUFFIX= -additions-nox11 MASTERDIR= ${.CURDIR}/../virtualbox-ose-additions OPTIONS_EXCLUDE= DBUS DEBUG OPENGL X11 .include "${MASTERDIR}/Makefile" diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile index 2e5c8cc62bf2..c837aeeccf71 100644 --- a/emulators/virtualbox-ose-additions/Makefile +++ b/emulators/virtualbox-ose-additions/Makefile @@ -1,175 +1,175 @@ PORTNAME= virtualbox-ose DISTVERSION= 6.1.50 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/ PKGNAMESUFFIX?= -additions DISTNAME= VirtualBox-${DISTVERSION} MAINTAINER= vbox@FreeBSD.org COMMENT= VirtualBox additions for FreeBSD guests WWW= https://www.virtualbox.org/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING ONLY_FOR_ARCHS= amd64 BUILD_DEPENDS= yasm:devel/yasm \ kmk:devel/kBuild \ xsltproc:textproc/libxslt USES= compiler:c++11-lang cpe iconv kmod tar:bzip2 CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox USE_RC_SUBR= vboxguest vboxservice HAS_CONFIGURE= yes CONFIGURE_ARGS+= --disable-alsa \ --disable-docs \ --disable-libvpx \ --disable-opengl \ --disable-pulse \ --disable-python \ --disable-sdl-ttf \ --disable-xpcom CONFIGURE_ARGS+= --nofatal --with-gcc="${CC}" --with-g++="${CXX}" MAKE_JOBS_UNSAFE= yes CONFLICTS_INSTALL= virtualbox-ose-additions-legacy \ virtualbox-ose-additions-nox11-legacy \ virtualbox-ose-additions-70 \ virtualbox-ose-additions-nox11-70 \ virtualbox-ose-additions-71 \ virtualbox-ose-additions-nox11-71 \ virtualbox-ose-additions-72 \ virtualbox-ose-additions-nox11-72 PATCHDIR= ${.CURDIR}/../${PORTNAME}/files EXTRACT_AFTER_ARGS= --exclude tools/*.x86 --exclude tools/*.amd64 --exclude Firmware PORTSCOUT= limit:^6\. WRKSRC= ${WRKDIR}/VirtualBox-${DISTVERSION} OPTIONS_DEFINE= DBUS DEBUG X11 OPTIONS_DEFAULT= DBUS X11 OPTIONS_SUB= yes DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CONFIGURE_OFF= --disable-dbus DEBUG_CONFIGURE_ON= --build-debug DEBUG_VARS= KMK_BUILDTYPE=debug DEBUG_VARS_OFF= KMK_BUILDTYPE=release X11_BUILD_DEPENDS= ${LOCALBASE}/include/xorg/compiler.h:x11-servers/xorg-server X11_RUN_DEPENDS= xrandr:x11/xrandr X11_USES= pkgconfig xorg X11_USE= XORG=x11,xcursor,xext,xorgproto,xmu,xrandr,xt X11_VARS= VBOX_WITH_X11=1 .include .if ${SLAVE_PORT} == no CONFLICTS_INSTALL+= virtualbox-ose-additions-nox11 .else CONFLICTS_INSTALL+= virtualbox-ose-additions .endif VIDEODIR= ${PREFIX}/lib/xorg/modules/drivers INPUTDIR= ${PREFIX}/lib/xorg/modules/input VBOX_BIN= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE}/bin/additions VBOX_SBINS= VBoxControl \ VBoxService \ mount_vboxvfs BUILD_WRKSRC= ${VBOX_BIN}/src KMK_ARCH= freebsd.${ARCH:S/i386/x86/} KMK_CONFIG+= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys .if ${PORT_OPTIONS:MX11} .else VBOX_WITH_X11= .endif .include post-patch: @${ECHO_CMD} 'VBOX_ONLY_ADDITIONS = 1' > ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_X11_ADDITIONS = ${VBOX_WITH_X11}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GCC_std = -std=c++11' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'CXXDEFS += _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR' >> \ ${WRKSRC}/LocalConfig.kmk .if ${COMPILER_TYPE} == clang @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -fno-merge-constants||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk .endif @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${WRKSRC}/src/VBox/Additions/x11/vboxmouse/Makefile.kmk \ ${WRKSRC}/src/VBox/Additions/x11/vboxvideo/Makefile.kmk @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ ${WRKSRC}/configure .if empty(ICONV_LIB) @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk \ ${WRKSRC}/src/VBox/Additions/x11/VBoxClient/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${OSVERSION} >= 1500038 @${ECHO_CMD} 'HAVE_MNTOPTS_IN_LIBUTIL = 1' >> \ ${WRKSRC}/LocalConfig.kmk .endif post-patch-X11-on: @${ECHO_CMD} 'VBOX_USE_SYSTEM_XORG_HEADERS = 1' >> \ ${WRKSRC}/LocalConfig.kmk pre-build: cd ${WRKSRC} && ${SH} -c \ ". env.sh && ${KMK_CONFIG} ${LOCALBASE}/bin/kmk" do-install: ${MKDIR} ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/src/vboxguest/vboxguest.ko \ ${STAGEDIR}${KMODDIR} ${INSTALL_KLD} ${VBOX_BIN}/vboxvfs.ko ${STAGEDIR}${KMODDIR} ${INSTALL_LIB} ${VBOX_BIN}/pam_vbox.so ${STAGEDIR}${PREFIX}/lib ${INSTALL_PROGRAM} ${VBOX_SBINS:S|^|${VBOX_BIN}/|} \ ${STAGEDIR}${PREFIX}/sbin/ do-install-X11-on: ${INSTALL_PROGRAM} ${VBOX_BIN}/VBoxClient ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_SCRIPT} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/98vboxadd-xclient \ ${STAGEDIR}${PREFIX}/bin/VBoxClient-all # X11 autostart ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${STAGEDIR}${PREFIX}/etc/xdg/autostart/ # KDE autostart ${MKDIR} ${STAGEDIR}${PREFIX}/share/autostart/ ${INSTALL_DATA} \ ${WRKSRC}/src/VBox/Additions/x11/Installer/vboxclient.desktop \ ${STAGEDIR}${PREFIX}/share/autostart/ ${MKDIR} ${STAGEDIR}${VIDEODIR} ${INSTALL_LIB} ${VBOX_BIN}/vboxvideo_drv_system.so \ ${STAGEDIR}${VIDEODIR}/vboxvideo_drv.so ${MKDIR} ${STAGEDIR}${INPUTDIR} ${INSTALL_LIB} ${VBOX_BIN}/vboxmouse_drv_system.so \ ${STAGEDIR}${INPUTDIR}/vboxmouse_drv.so .include diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp index 8f6810a5bc82..bfcd88c67974 100644 --- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp +++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp @@ -1,71 +1,87 @@ ---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2017-03-08 17:15:20 UTC +--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2020-07-09 16:50:08 UTC +++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp @@ -71,8 +71,8 @@ # include # include /* getpwuid */ # include -# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU) -# include /** @todo FreeBSD 9 should have this. */ +# if !defined(RT_OS_OS2) && !defined(RT_OS_HAIKU) +# include # endif # ifdef RT_OS_OS2 # include -@@ -531,7 +531,7 @@ static void vgsvcVMInfoWriteFixedPropert +@@ -531,7 +531,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) } -#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */ /* * Simple wrapper to work around compiler-specific va_list madness. */ @@ -562,12 +562,6 @@ static int vgsvcVMInfoWriteUsers(void) rc = VERR_NOT_IMPLEMENTED; # endif -#elif defined(RT_OS_FREEBSD) - /** @todo FreeBSD: Port logged on user info retrieval. - * However, FreeBSD 9 supports utmpx, so we could use the code - * block below (?). */ - rc = VERR_NOT_IMPLEMENTED; - #elif defined(RT_OS_HAIKU) /** @todo Haiku: Port logged on user info retrieval. */ rc = VERR_NOT_IMPLEMENTED; @@ -593,7 +587,7 @@ static int vgsvcVMInfoWriteUsers(void) while ( (ut_user = getutxent()) && RT_SUCCESS(rc)) { -# ifdef RT_OS_DARWIN /* No ut_user->ut_session on Darwin */ +# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) /* No ut_user->ut_session on Darwin/FreeBSD */ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid); # else VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n", @@ -628,7 +622,7 @@ static int vgsvcVMInfoWriteUsers(void) } # ifdef VBOX_WITH_DBUS -# if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +# if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /* Not yet for Solaris. */ DBusError dbErr; DBusConnection *pConnection = NULL; int rc2 = RTDBusLoadLib(); @@ -837,7 +831,7 @@ static int vgsvcVMInfoWriteUsers(void) if ( fHaveLibDbus && dbus_error_is_set(&dbErr)) dbus_error_free(&dbErr); -# endif /* RT_OS_LINUX */ +# endif /* RT_OS_LINUX || RT_OS_FREEBSD */ # endif /* VBOX_WITH_DBUS */ /** @todo Fedora/others: Handle systemd-loginctl. */ @@ -874,7 +868,7 @@ static int vgsvcVMInfoWriteUsers(void) RTMemFree(papszUsers); endutxent(); /* Close utmpx file. */ -#endif /* !RT_OS_WINDOWS && !RT_OS_FREEBSD && !RT_OS_HAIKU && !RT_OS_OS2 */ +#endif /* !RT_OS_WINDOWS && !RT_OS_HAIKU && !RT_OS_OS2 */ Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList)); +@@ -1152,6 +1146,15 @@ static int vgsvcVMInfoWriteNetwork(void) + + RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported); + VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down"); ++ ++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */ ++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported); ++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name); ++ if (RT_SUCCESS(rc2)) ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name); ++ else ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL); ++# endif + + cIfsReported++; + } diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp index 70b459e94da7..b1ccef033ff1 100644 --- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp +++ b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp @@ -1,71 +1,87 @@ ---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2021-01-07 15:34:20 UTC +--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2024-01-11 12:11:39 UTC +++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp @@ -67,8 +67,8 @@ # include # include /* getpwuid */ # include -# if !defined(RT_OS_OS2) && !defined(RT_OS_FREEBSD) && !defined(RT_OS_HAIKU) -# include /** @todo FreeBSD 9 should have this. */ +# if !defined(RT_OS_OS2) && !defined(RT_OS_HAIKU) +# include # endif # ifdef RT_OS_OS2 # include @@ -528,7 +528,7 @@ static void vgsvcVMInfoWriteFixedProperties(void) } -#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */ /* * Simple wrapper to work around compiler-specific va_list madness. */ @@ -555,12 +555,6 @@ static int vgsvcVMInfoWriteUsers(void) #ifdef RT_OS_WINDOWS rc = VGSvcVMInfoWinWriteUsers(&g_VMInfoPropCache, &pszUserList, &cUsersInList); -#elif defined(RT_OS_FREEBSD) - /** @todo FreeBSD: Port logged on user info retrieval. - * However, FreeBSD 9 supports utmpx, so we could use the code - * block below (?). */ - rc = VERR_NOT_IMPLEMENTED; - #elif defined(RT_OS_HAIKU) /** @todo Haiku: Port logged on user info retrieval. */ rc = VERR_NOT_IMPLEMENTED; @@ -586,7 +580,7 @@ static int vgsvcVMInfoWriteUsers(void) while ( (ut_user = getutxent()) && RT_SUCCESS(rc)) { -# ifdef RT_OS_DARWIN /* No ut_user->ut_session on Darwin */ +# if defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) /* No ut_user->ut_session on Darwin/FreeBSD */ VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid); # else VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n", @@ -621,7 +615,7 @@ static int vgsvcVMInfoWriteUsers(void) } # ifdef VBOX_WITH_DBUS -# if defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */ +# if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) /* Not yet for Solaris. */ DBusError dbErr; DBusConnection *pConnection = NULL; int rc2 = RTDBusLoadLib(); @@ -830,7 +824,7 @@ static int vgsvcVMInfoWriteUsers(void) if ( fHaveLibDbus && dbus_error_is_set(&dbErr)) dbus_error_free(&dbErr); -# endif /* RT_OS_LINUX */ +# endif /* RT_OS_LINUX || RT_OS_FREEBSD */ # endif /* VBOX_WITH_DBUS */ /** @todo Fedora/others: Handle systemd-loginctl. */ @@ -867,7 +861,7 @@ static int vgsvcVMInfoWriteUsers(void) RTMemFree(papszUsers); endutxent(); /* Close utmpx file. */ -#endif /* !RT_OS_WINDOWS && !RT_OS_FREEBSD && !RT_OS_HAIKU && !RT_OS_OS2 */ +#endif /* !RT_OS_WINDOWS && !RT_OS_HAIKU && !RT_OS_OS2 */ Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList)); +@@ -1154,6 +1148,15 @@ static int vgsvcVMInfoWriteNetwork(void) + + RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported); + VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down"); ++ ++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */ ++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported); ++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name); ++ if (RT_SUCCESS(rc2)) ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name); ++ else ++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL); ++# endif + + cIfsReported++; + }