VirtualBox

Changeset 50406 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Feb 10, 2014 8:35:11 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92169
Message:

Some RTEnvGet cleanup, adding todos for the rest.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp

    r48694 r50406  
    177177    for (unsigned i = 0; i < RT_ELEMENTS(s_aProps); i++)
    178178    {
    179         const char *pszEnvValue = RTEnvGet(s_aProps[i].pszEnvName);
    180         if (pszEnvValue)
     179        char szEnvValue[8192];
     180        int rcEnv = RTEnvGetEx(RTENV_DEFAULT, s_aProps[i].pszEnvName, szEnvValue, sizeof(szEnvValue), NULL);
     181        if (RT_SUCCESS(rc))
    181182        {
    182             rc = RTDbgCfgChangeString(pUVM->dbgf.s.hDbgCfg, s_aProps[i].enmProp, RTDBGCFGOP_PREPEND, pszEnvValue);
     183            rc = RTDbgCfgChangeString(pUVM->dbgf.s.hDbgCfg, s_aProps[i].enmProp, RTDBGCFGOP_PREPEND, szEnvValue);
    183184            if (RT_FAILURE(rc))
    184185                return VMR3SetError(pUVM, rc, RT_SRC_POS,
    185                                     "DBGF Config Error: %s=%s -> %Rrc", s_aProps[i].pszEnvName, pszEnvValue, rc);
     186                                    "DBGF Config Error: %s=%s -> %Rrc", s_aProps[i].pszEnvName, szEnvValue, rc);
    186187        }
     188        else if (rc != VERR_ENV_VAR_NOT_FOUND)
     189            return VMR3SetError(pUVM, rc, RT_SRC_POS,
     190                                "DBGF Config Error: Error querying env.var. %s: %Rrc", s_aProps[i].pszEnvName, rc);
    187191
    188192        char *pszCfgValue;
Note: See TracChangeset for help on using the changeset viewer.

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