VirtualBox

Ignore:
Timestamp:
Oct 4, 2012 12:24:20 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
81139
Message:

Main/Metrics: Host network interface metrics for Solaris (#6345)

File:
1 edited

Legend:

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

    r43523 r43538  
    157157        RTStrPrintf(szBuf, sizeof(szBuf), "/sys/class/net/%s/speed", pszName);
    158158        fp = fopen(szBuf, "r");
    159         if (fp && fscanf(fp, "%u", &pInfo->uSpeedMbytes) == 1)
     159        if (fp && fscanf(fp, "%u", &pInfo->uSpeedMbits) == 1)
    160160            fclose(fp);
    161161        else
     
    164164            int rc = NetIfAdpCtlOut(pszName, "speed", szBuf, sizeof(szBuf));
    165165            if (RT_SUCCESS(rc))
    166                 pInfo->uSpeedMbytes = RTStrToUInt32(szBuf);
     166                pInfo->uSpeedMbits = RTStrToUInt32(szBuf);
    167167            else
    168                 pInfo->uSpeedMbytes = 0;
     168                pInfo->uSpeedMbits = 0;
    169169        }
    170170    }
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