Changeset 43994 in vbox for trunk/src/VBox/Main/src-server/linux
- Timestamp:
- Nov 29, 2012 8:58:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/linux/NetIf-linux.cpp
r43668 r43994 170 170 fclose(fp); 171 171 } 172 if (pInfo->uSpeedMbits == 10) 173 { 174 /* Check the cable is plugged in at all */ 175 unsigned uCarrier = 0; 176 RTStrPrintf(szBuf, sizeof(szBuf), "/sys/class/net/%s/carrier", pszName); 177 fp = fopen(szBuf, "r"); 178 if (fp) 179 { 180 if (fscanf(fp, "%u", &uCarrier) != 1 || uCarrier == 0) 181 pInfo->uSpeedMbits = 0; 182 fclose(fp); 183 } 184 } 185 172 186 if (pInfo->uSpeedMbits == 0) 173 187 {
Note:
See TracChangeset
for help on using the changeset viewer.