Changeset 43538 in vbox for trunk/src/VBox/Main/src-server/linux
- Timestamp:
- Oct 4, 2012 12:24:20 PM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 81139
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/linux/NetIf-linux.cpp
r43523 r43538 157 157 RTStrPrintf(szBuf, sizeof(szBuf), "/sys/class/net/%s/speed", pszName); 158 158 fp = fopen(szBuf, "r"); 159 if (fp && fscanf(fp, "%u", &pInfo->uSpeedMb ytes) == 1)159 if (fp && fscanf(fp, "%u", &pInfo->uSpeedMbits) == 1) 160 160 fclose(fp); 161 161 else … … 164 164 int rc = NetIfAdpCtlOut(pszName, "speed", szBuf, sizeof(szBuf)); 165 165 if (RT_SUCCESS(rc)) 166 pInfo->uSpeedMb ytes = RTStrToUInt32(szBuf);166 pInfo->uSpeedMbits = RTStrToUInt32(szBuf); 167 167 else 168 pInfo->uSpeedMb ytes = 0;168 pInfo->uSpeedMbits = 0; 169 169 } 170 170 }
Note:
See TracChangeset
for help on using the changeset viewer.