Changeset 43541 in vbox for trunk/src/VBox/Main/src-server/solaris
- Timestamp:
- Oct 4, 2012 1:04:59 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/solaris/NetIf-solaris.cpp
r43538 r43541 51 51 #include "DynLoadLibSolaris.h" 52 52 53 static uint64 kstatGet(const char *pszMask)53 static uint64_t kstatGet(const char *pszMask) 54 54 { 55 55 char szBuf[RTPATH_MAX]; … … 107 107 char szMask[RTPATH_MAX]; 108 108 RTStrPrintf(szMask, sizeof(szMask), "*:*:%s:ifspeed", pInfo->szShortName); 109 pInfo->uSpeedMbits= kstatGet(szMask);110 if ( pInfo->uSpeedMbits== 0)109 uint64_t uSpeed = kstatGet(szMask); 110 if (uSpeed == 0) 111 111 { 112 112 Log(("queryIfaceSpeed: failed to get speed for %s via kstat(%s)\n", pInfo->szShortName, szMask)); … … 116 116 RTStrPrintf(szMask, sizeof(szMask), "%s:%u:*:ifspeed", 117 117 szDevName, uInstance); 118 pInfo->uSpeedMbits= kstatGet(szMask);119 if ( pInfo->uSpeedMbits== 0)118 uSpeed = kstatGet(szMask); 119 if (uSpeed == 0) 120 120 LogRel(("queryIfaceSpeed: failed to get speed for %s(instance=%u) via kstat\n", szDevName, uInstance)); 121 121 } 122 pInfo->uSpeedMbits /=1000000; /* bits -> Mbits */122 pInfo->uSpeedMbits = uSpeed / 1000000; /* bits -> Mbits */ 123 123 } 124 124
Note:
See TracChangeset
for help on using the changeset viewer.