VirtualBox

Changeset 43845 in vbox


Ignore:
Timestamp:
Nov 9, 2012 6:30:01 AM (12 years ago)
Author:
vboxsync
Message:

Main/Metrics: More reliable disk stats parsing (#6345)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/linux/PerformanceLinux.cpp

    r43843 r43845  
    362362        while (fgets(szBuf, sizeof(szBuf), f))
    363363        {
    364             char *pszBufName = &szBuf[13];
     364            char *pszBufName = szBuf;
     365            while (*pszBufName == ' ')         ++pszBufName; /* Skip spaces */
     366            while (RT_C_IS_DIGIT(*pszBufName)) ++pszBufName; /* Skip major */
     367            while (*pszBufName == ' ')         ++pszBufName; /* Skip spaces */
     368            while (RT_C_IS_DIGIT(*pszBufName)) ++pszBufName; /* Skip minor */
     369            while (*pszBufName == ' ')         ++pszBufName; /* Skip spaces */
     370
    365371            char *pszBufData = strchr(pszBufName, ' ');
    366372            if (!pszBufData)
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