VirtualBox

Changeset 20859 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jun 23, 2009 5:29:34 PM (16 years ago)
Author:
vboxsync
Message:

IPRT: Increased the logger buffer and replaced a bunch RTUINT with uint32_t (same type).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/log/log.cpp

    r20853 r20859  
    192192 * @param   ...                 Format arguments.
    193193 */
    194 RTDECL(int) RTLogCreateExV(PRTLOGGER *ppLogger, RTUINT fFlags, const char *pszGroupSettings,
     194RTDECL(int) RTLogCreateExV(PRTLOGGER *ppLogger, uint32_t fFlags, const char *pszGroupSettings,
    195195                           const char *pszEnvVarBase, unsigned cGroups, const char * const * papszGroups,
    196                            RTUINT fDestFlags, char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, va_list args)
     196                           uint32_t fDestFlags, char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, va_list args)
    197197{
    198198    int        rc;
     
    505505 * @param   ...                 Format arguments.
    506506 */
    507 RTDECL(int) RTLogCreate(PRTLOGGER *ppLogger, RTUINT fFlags, const char *pszGroupSettings,
     507RTDECL(int) RTLogCreate(PRTLOGGER *ppLogger, uint32_t fFlags, const char *pszGroupSettings,
    508508                        const char *pszEnvVarBase, unsigned cGroups, const char * const * papszGroups,
    509                         RTUINT fDestFlags, const char *pszFilenameFmt, ...)
     509                        uint32_t fDestFlags, const char *pszFilenameFmt, ...)
    510510{
    511511    va_list args;
     
    536536 * @param   ...                 Format arguments.
    537537 */
    538 RTDECL(int) RTLogCreateEx(PRTLOGGER *ppLogger, RTUINT fFlags, const char *pszGroupSettings,
     538RTDECL(int) RTLogCreateEx(PRTLOGGER *ppLogger, uint32_t fFlags, const char *pszGroupSettings,
    539539                          const char *pszEnvVarBase, unsigned cGroups, const char * const * papszGroups,
    540                           RTUINT fDestFlags,  char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, ...)
     540                          uint32_t fDestFlags,  char *pszErrorMsg, size_t cchErrorMsg, const char *pszFilenameFmt, ...)
    541541{
    542542    va_list args;
     
    560560{
    561561    int            rc;
    562     RTUINT         iGroup;
     562    uint32_t       iGroup;
    563563    RTSEMFASTMUTEX MutexSem;
    564564
     
    642642 */
    643643RTDECL(int) RTLogCloneRC(PRTLOGGER pLogger, PRTLOGGERRC pLoggerRC, size_t cbLoggerRC,
    644                          RTRCPTR pfnLoggerRCPtr, RTRCPTR pfnFlushRCPtr, RTUINT fFlags)
     644                         RTRCPTR pfnLoggerRCPtr, RTRCPTR pfnFlushRCPtr, uint32_t fFlags)
    645645{
    646646    /*
     
    779779 * @param   fDestFlags          The destination flags.
    780780 */
    781 RTDECL(int) RTLogCreateForR0(PRTLOGGER pLogger, size_t cbLogger, PFNRTLOGGER pfnLogger, PFNRTLOGFLUSH pfnFlush, RTUINT fFlags, RTUINT fDestFlags)
     781RTDECL(int) RTLogCreateForR0(PRTLOGGER pLogger, size_t cbLogger, PFNRTLOGGER pfnLogger, PFNRTLOGFLUSH pfnFlush,
     782                             uint32_t fFlags, uint32_t fDestFlags)
    782783{
    783784    /*
     
    803804    pLogger->pszFilename  = NULL;
    804805    pLogger->papszGroups  = NULL;
    805     pLogger->cMaxGroups   = (RTUINT)((cbLogger - RT_OFFSETOF(RTLOGGER, afGroups[0])) / sizeof(pLogger->afGroups[0]));
     806    pLogger->cMaxGroups   = (uint32_t)((cbLogger - RT_OFFSETOF(RTLOGGER, afGroups[0])) / sizeof(pLogger->afGroups[0]));
    806807    pLogger->cGroups      = 1;
    807808    pLogger->afGroups[0]  = 0;
     
    17561757            uint32_t cb = sizeof(pThis->achScratch) - pThis->offScratch - 1; /* minus 1 - for the string terminator. */
    17571758            if (cb > cbChars)
    1758                 cb = (RTUINT)cbChars;
     1759                cb = (uint32_t)cbChars;
    17591760
    17601761            /* copy */
     
    19001901
    19011902            /* advance */
    1902             pLogger->offScratch += (RTUINT)cb;
     1903            pLogger->offScratch += (uint32_t)cb;
    19031904            cbRet += cb;
    19041905            cbChars -= cb;
     
    22582259                cb = psz - &pLogger->achScratch[pLogger->offScratch];
    22592260                Assert(cb <= 198);
    2260                 pLogger->offScratch += (RTUINT)cb;
     2261                pLogger->offScratch += (uint32_t)cb;
    22612262                cb = sizeof(pLogger->achScratch) - pLogger->offScratch - 1;
    22622263            }
     
    22982299
    22992300            /* advance */
    2300             pLogger->offScratch += (RTUINT)cb;
     2301            pLogger->offScratch += (uint32_t)cb;
    23012302            cbRet += cb;
    23022303            cbChars -= cb;
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