VirtualBox

Changeset 70066 in vbox


Ignore:
Timestamp:
Dec 11, 2017 4:33:05 PM (7 years ago)
Author:
vboxsync
Message:

VBoxGuest: Enabled VGDrvCommonProcessOptionsFromHost for all but linux and freebsd.

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp

    r69500 r70066  
    667667{
    668668    NOREF(pDevExt);
     669}
     670
     671
     672bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     673{
     674    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     675    return false;
    669676}
    670677
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c

    r69500 r70066  
    563563}
    564564
     565
    565566/**
    566567 * Interrupt service routine.
     
    587588    selwakeup(&g_SelInfo);
    588589}
     590
     591
     592bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     593{
     594    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     595    return false;
     596}
     597
    589598
    590599/**
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-haiku.c

    r69500 r70066  
    354354
    355355
     356bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     357{
     358    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     359    return false;
     360}
     361
     362
    356363/**
    357364 * Sets IRQ for VMMDev.
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r70033 r70066  
    10581058
    10591059
     1060bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     1061{
     1062    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     1063    return false;
     1064}
     1065
     1066
    10601067#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    10611068
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c

    r70065 r70066  
    530530
    531531
     532bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     533{
     534    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     535    return false;
     536}
     537
     538
    532539static int VBoxGuestNetBSDSetMouseStatus(vboxguest_softc *sc, uint32_t fStatus)
    533540{
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-os2.cpp

    r69500 r70066  
    605605
    606606
     607bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     608{
     609    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     610    return false;
     611}
     612
     613
    607614#ifdef DEBUG_READ /** @todo figure out this one once and for all... */
    608615
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c

    r69500 r70066  
    10831083
    10841084
     1085bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     1086{
     1087    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     1088    return false;
     1089}
     1090
     1091
    10851092/**
    10861093 * Sets the mouse notification callback.
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp

    r70041 r70066  
    10851085
    10861086/**
     1087 * Hook for handling OS specfic options from the host.
     1088 *
     1089 * @returns true if handled, false if not.
     1090 * @param   pDevExt         The device extension.
     1091 * @param   pszName         The option name.
     1092 * @param   pszValue        The option value.
     1093 */
     1094bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
     1095{
     1096    RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
     1097    return false;
     1098}
     1099
     1100
     1101
     1102/**
    10871103 * Queries (gets) a DWORD value from the registry.
    10881104 *
     
    11381154    }
    11391155
    1140 #if 0 /* test me */
    11411156    /*
    11421157     * Read configuration from the host.
    11431158     */
     1159    LogRelFunc(("Calling VGDrvCommonProcessOptionsFromHost...\n"));
    11441160    VGDrvCommonProcessOptionsFromHost(&pDevExt->Core);
    1145 #endif
     1161    LogRelFunc(("VGDrvCommonProcessOptionsFromHost returned\n"));
    11461162}
    11471163
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r70058 r70066  
    5555#include <VBox/VMMDev.h> /* for VMMDEV_RAM_SIZE */
    5656#include <VBox/log.h>
     57#if !defined(RT_OS_LINUX) && !defined(RT_OS_FREEBSD)
     58# include <VBox/HostServices/GuestPropertySvc.h>
     59#endif
    5760#include <iprt/ctype.h>
    5861#include <iprt/mem.h>
     
    11361139}
    11371140
    1138 #if 0 /* needs testing */
    1139 
    1140 #include <VBox/HostServices/GuestPropertySvc.h>
    1141 
    1142 /**
    1143  * Checks if the given option can be taken to no mean 'false'.
     1141
     1142/**
     1143 * Checks if the given option can be taken to not mean 'false'.
    11441144 *
    11451145 * @returns true or false accordingly.
     
    11591159            && ch != 'N' /* NO */
    11601160            && ch != 'd' /* disabled */
     1161            && ch != 'f' /* false*/
     1162            && ch != 'F' /* FALSE */
    11611163            && ch != 'D' /* DISABLED */
    11621164            && (   (ch != 'o' && ch != 'O') /* off, OFF, Off */
     
    11701172
    11711173/**
    1172  * Hook for handling OS specfic options from the host.
    1173  *
    1174  * @returns true if handled, false if not.
    1175  * @param   pDevExt         The device extension.
    1176  * @param   pszName         The option name.
    1177  * @param   pszValue        The option value.
    1178  */
    1179 bool VGDrvNativeProcessOption(PVBOXGUESTDEVEXT pDevExt, const char *pszName, const char *pszValue)
    1180 {
    1181     RT_NOREF(pDevExt); RT_NOREF(pszName); RT_NOREF(pszValue);
    1182     return false;
    1183 }
    1184 
    1185 /**
    11861174 * Processes a option.
    11871175 *
     
    12111199void VGDrvCommonProcessOptionsFromHost(PVBOXGUESTDEVEXT pDevExt)
    12121200{
     1201#if !defined(RT_OS_LINUX) && !defined(RT_OS_FREEBSD)
    12131202    /*
    12141203     * Create a kernel session without our selves, then connect to the HGCM service.
     
    12221211            VBGLIOCHGCMCONNECT          Connect;
    12231212            VBGLIOCHGCMDISCONNECT       Disconnect;
    1224             guestProp::EnumProperties   EnumMsg;
     1213            GuestPropMsgEnumProperties  EnumMsg;
    12251214        } uBuf;
    12261215
     
    12391228
    12401229            /*
    1241              * Enumerate all the relevant properties.  We try with a 2KB buffer, but
    1242              * will double it until we get what we want or go beyond 64KB.
     1230             * Enumerate all the relevant properties.  We try with a 1KB buffer, but
     1231             * will double it until we get what we want or go beyond 16KB.
    12431232             */
    1244             for (cbStrings = _2K; cbStrings <= _64K; cbStrings *= 2)
     1233            for (cbStrings = _1K; cbStrings <= _16K; cbStrings *= 2)
    12451234            {
    12461235                pszzStrings = (char *)RTMemAllocZ(cbStrings);
    12471236                if (pszzStrings)
    12481237                {
    1249                     VBGL_HGCM_HDR_INIT(&uBuf.EnumMsg.hdr, idClient, guestProp::ENUM_PROPS, 3);
     1238                    VBGL_HGCM_HDR_INIT(&uBuf.EnumMsg.hdr, idClient, GUEST_PROP_FN_ENUM_PROPS, 3);
    12501239
    12511240                    uBuf.EnumMsg.patterns.type                    = VMMDevHGCMParmType_LinAddr;
     
    12631252                                          &uBuf.EnumMsg.hdr.Hdr, sizeof(uBuf.EnumMsg));
    12641253                    if (RT_SUCCESS(rc))
     1254                    {
     1255                        if (   uBuf.EnumMsg.size.type == VMMDevHGCMParmType_32bit
     1256                            && uBuf.EnumMsg.size.u.value32 <= cbStrings
     1257                            && uBuf.EnumMsg.size.u.value32 > 0)
     1258                            cbStrings = uBuf.EnumMsg.size.u.value32;
     1259                        Log(("VGDrvCommonReadConfigurationFromHost: GUEST_PROP_FN_ENUM_PROPS -> %#x bytes (cbStrings=%#x)\n",
     1260                             uBuf.EnumMsg.size.u.value32, cbStrings));
    12651261                        break;
     1262                    }
    12661263
    12671264                    RTMemFree(pszzStrings);
     
    13131310                                if (!ch)
    13141311                                    break;
     1312                                if (fValidFields)
     1313                                    Log(("VGDrvCommonReadConfigurationFromHost: Invalid char %#x at %#x (field %u)\n",
     1314                                         ch, off - 1, iField));
    13151315                                fValidFields = false;
    13161316                            }
    13171317                        }
    13181318                    }
    1319                     if (   off < cbStrings
     1319                    if (   off <= cbStrings
    13201320                        && fValidFields
    13211321                        && *apszFields[0] != '\0')
     
    13421342                    {
    13431343                        LogRel(("VBoxGuest: Malformed guest properties enum result!\n"));
     1344                        Log(("VBoxGuest: off=%#x cbStrings=%#x\n%.*Rhxd\n", off, cbStrings, cbStrings, pszzStrings));
    13441345                        break;
    13451346                    }
    1346                     else if (fValidFields)
     1347                    else if (!fValidFields)
    13471348                        LogRel(("VBoxGuest: Ignoring %.*Rhxs as it has invalid characters in one or more fields\n",
    13481349                                (int)strlen(apszFields[0]), apszFields[0]));
     
    13621363    else
    13631364        LogRel(("VGDrvCommonReadConfigurationFromHost: failed to connect: %Rrc\n", rc));
    1364 }
    1365 
    1366 #endif /* needs testing */
     1365
     1366#else   /* RT_OS_LINUX || RT_OS_FREEBSD */
     1367    RT_NOREF(pDevExt);
     1368#endif
     1369}
     1370
    13671371
    13681372/**
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette