Changeset 56569 in vbox for trunk/src/VBox
- Timestamp:
- Jun 20, 2015 8:37:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/log/log.cpp
r56389 r56569 301 301 uint32_t fFlag; /**< The flag value. */ 302 302 bool fInverted; /**< Inverse meaning? */ 303 } const s_aLogFlags[] =303 } const g_aLogFlags[] = 304 304 { 305 305 { "disabled", sizeof("disabled" ) - 1, RTLOGFLAGS_DISABLED, false }, … … 2048 2048 2049 2049 /* instruction. */ 2050 for (i = 0; i < RT_ELEMENTS( s_aLogFlags); i++)2051 { 2052 if (!strncmp(pszValue, s_aLogFlags[i].pszInstr, s_aLogFlags[i].cchInstr))2050 for (i = 0; i < RT_ELEMENTS(g_aLogFlags); i++) 2051 { 2052 if (!strncmp(pszValue, g_aLogFlags[i].pszInstr, g_aLogFlags[i].cchInstr)) 2053 2053 { 2054 if (fNo == s_aLogFlags[i].fInverted)2055 pLogger->fFlags |= s_aLogFlags[i].fFlag;2054 if (fNo == g_aLogFlags[i].fInverted) 2055 pLogger->fFlags |= g_aLogFlags[i].fFlag; 2056 2056 else 2057 pLogger->fFlags &= ~ s_aLogFlags[i].fFlag;2058 pszValue += s_aLogFlags[i].cchInstr;2057 pLogger->fFlags &= ~g_aLogFlags[i].fFlag; 2058 pszValue += g_aLogFlags[i].cchInstr; 2059 2059 break; 2060 2060 } … … 2062 2062 2063 2063 /* unknown instruction? */ 2064 if (i >= RT_ELEMENTS( s_aLogFlags))2064 if (i >= RT_ELEMENTS(g_aLogFlags)) 2065 2065 { 2066 2066 AssertMsgFailed(("Invalid flags! unknown instruction %.20s\n", pszValue)); … … 2174 2174 */ 2175 2175 fFlags = pLogger->fFlags; 2176 for (i = 0; i < RT_ELEMENTS( s_aLogFlags); i++)2177 if ( ! s_aLogFlags[i].fInverted2178 ? ( s_aLogFlags[i].fFlag & fFlags)2179 : !( s_aLogFlags[i].fFlag & fFlags))2180 { 2181 size_t cchInstr = s_aLogFlags[i].cchInstr;2176 for (i = 0; i < RT_ELEMENTS(g_aLogFlags); i++) 2177 if ( !g_aLogFlags[i].fInverted 2178 ? (g_aLogFlags[i].fFlag & fFlags) 2179 : !(g_aLogFlags[i].fFlag & fFlags)) 2180 { 2181 size_t cchInstr = g_aLogFlags[i].cchInstr; 2182 2182 if (cchInstr + fNotFirst + 1 > cchBuf) 2183 2183 { … … 2190 2190 cchBuf--; 2191 2191 } 2192 memcpy(pszBuf, s_aLogFlags[i].pszInstr, cchInstr);2192 memcpy(pszBuf, g_aLogFlags[i].pszInstr, cchInstr); 2193 2193 pszBuf += cchInstr; 2194 2194 cchBuf -= cchInstr;
Note:
See TracChangeset
for help on using the changeset viewer.