VirtualBox

Changeset 70095 in vbox


Ignore:
Timestamp:
Dec 12, 2017 6:32:35 PM (7 years ago)
Author:
vboxsync
Message:

VBoxGuest: More host options.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r70085 r70095  
    11511151static int vgdrvLinuxParamR3LogToHostSet(const char *pszValue, struct kernel_param *pParam)
    11521152{
    1153     if (    pszValue == NULL
    1154         || *pszValue == '\0'
    1155         || *pszValue == 'n'
    1156         || *pszValue == 'N'
    1157         || *pszValue == 'd'
    1158         || *pszValue == 'D'
    1159         || (   (*pszValue == 'o' || *pszValue == 'O')
    1160             && (*pszValue == 'f' || *pszValue == 'F') )
    1161        )
    1162         g_DevExt.fLoggingEnabled = false;
    1163     else
    1164         g_DevExt.fLoggingEnabled = true;
     1153    g_DevExt.fLoggingEnabled = VBDrvCommonIsOptionValueTrue(pszValue);
    11651154    return 0;
    11661155}
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r70085 r70095  
    11821182    Log(("VGDrvCommonProcessOption: pszName='%s' pszValue='%s'\n", pszName, pszValue));
    11831183
    1184     if (   strcmp(pszName, "r3_log_to_host") == 0
    1185         || strcmp(pszName, "LoggingEnabled") == 0 /*legacy*/ )
     1184    if (   RTStrICmpAscii(pszName, "r3_log_to_host") == 0
     1185        || RTStrICmpAscii(pszName, "LoggingEnabled") == 0 /*legacy*/ )
    11861186        pDevExt->fLoggingEnabled = VBDrvCommonIsOptionValueTrue(pszValue);
    1187     else if (VGDrvNativeProcessOption(pDevExt, pszName, pszValue))
     1187    else if (   RTStrNICmp(pszName, RT_STR_TUPLE("log")) == 0
     1188             || RTStrNICmpAscii(pszName, RT_STR_TUPLE("dbg_log")) == 0)
     1189    {
     1190        bool const  fLogRel    = *pszName == 'd' || *pszName == 'D';
     1191        const char *pszSubName = &pszName[fLogRel ? 4 + 3 : 3];
     1192        if (   !*pszSubName
     1193            || RTStrICmpAscii(pszSubName, "_flags") == 0
     1194            || RTStrICmpAscii(pszSubName, "_dest") == 0)
     1195        {
     1196            PRTLOGGER pLogger = fLogRel ? RTLogRelGetDefaultInstance() : RTLogDefaultInstance();
     1197            if (pLogger)
     1198            {
     1199                if (!*pszSubName)
     1200                    RTLogGroupSettings(pLogger, pszValue);
     1201                else if (RTStrICmpAscii(pszSubName, "_flags"))
     1202                    RTLogFlags(pLogger, pszValue);
     1203                else
     1204                    RTLogDestinations(pLogger, pszValue);
     1205            }
     1206        }
     1207        else if (!VGDrvNativeProcessOption(pDevExt, pszName, pszValue))
     1208            LogRel(("VBoxGuest: Ignoring unknown option '%s' (value '%s')\n", pszName, pszValue));
     1209    }
     1210    else if (!VGDrvNativeProcessOption(pDevExt, pszName, pszValue))
    11881211        LogRel(("VBoxGuest: Ignoring unknown option '%s' (value '%s')\n", pszName, pszValue));
    11891212}
  • trunk/src/VBox/Additions/common/VBoxGuest/freebsd/Makefile

    r69838 r70095  
    8989        RTStrCopyEx.c \
    9090        RTStrCopyP.c \
     91        RTStrICmpAscii.c \
     92        RTStrNICmpAscii.c \
    9193        strformat.c \
    9294        strformatnum.c \
  • trunk/src/VBox/Additions/common/VBoxGuest/freebsd/files_vboxguest

    r70085 r70095  
    124124    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyEx.cpp=>common/string/RTStrCopyEx.c \
    125125    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyP.cpp=>common/string/RTStrCopyP.c \
     126    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrICmpAscii.cpp=>common/string/RTStrICmpAscii.c \
     127    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNICmpAscii.cpp=>common/string/RTStrNICmpAscii.c \
    126128    ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \
    127129    ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatnum.cpp=>common/string/strformatnum.c \
  • trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile

    r69838 r70095  
    8686        common/string/RTStrCopyEx.o \
    8787        common/string/RTStrCopyP.o \
     88        common/string/RTStrICmpAscii.o \
     89        common/string/RTStrNICmpAscii.o \
    8890        common/string/strformat.o \
    8991        common/string/strformatnum.o \
  • trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest

    r70085 r70095  
    139139    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyEx.cpp=>common/string/RTStrCopyEx.c \
    140140    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyP.cpp=>common/string/RTStrCopyP.c \
     141    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrICmpAscii.cpp=>common/string/RTStrICmpAscii.c \
     142    ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNICmpAscii.cpp=>common/string/RTStrNICmpAscii.c \
    141143    ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \
    142144    ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatnum.cpp=>common/string/strformatnum.c \
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