Changeset 62363 in vbox for trunk/src/VBox/Main/src-server/linux
- Timestamp:
- Jul 20, 2016 3:45:58 PM (9 years ago)
- Location:
- trunk/src/VBox/Main/src-server/linux
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/linux/NetIf-linux.cpp
r57358 r62363 145 145 RTUuidClear(&uuid); 146 146 memcpy(&uuid, Req.ifr_name, RT_MIN(sizeof(Req.ifr_name), sizeof(uuid))); 147 uuid.Gen.u8ClockSeqHiAndReserved = (u uid.Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80;148 uuid.Gen.u16TimeHiAndVersion = (u uid.Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000;147 uuid.Gen.u8ClockSeqHiAndReserved = (uint8_t)((uuid.Gen.u8ClockSeqHiAndReserved & 0x3f) | 0x80); 148 uuid.Gen.u16TimeHiAndVersion = (uint16_t)((uuid.Gen.u16TimeHiAndVersion & 0x0fff) | 0x4000); 149 149 memcpy(uuid.Gen.au8Node, &Req.ifr_hwaddr.sa_data, sizeof(uuid.Gen.au8Node)); 150 150 pInfo->Uuid = uuid; … … 233 233 continue; 234 234 *pszEndOfName = 0; 235 int iFirstNonWS = strspn(buf, " ");236 char *pszName = buf +iFirstNonWS;235 size_t iFirstNonWS = strspn(buf, " "); 236 char *pszName = buf + iFirstNonWS; 237 237 NETIFINFO Info; 238 238 RT_ZERO(Info); -
trunk/src/VBox/Main/src-server/linux/PerformanceLinux.cpp
r60373 r62363 82 82 uint64_t mSingleUser, mSingleKernel, mSingleIdle; 83 83 uint32_t mHZ; 84 ULONG totalRAM;84 ULONG mTotalRAM; 85 85 }; 86 86 … … 101 101 } 102 102 else 103 mHZ = hz;103 mHZ = (uint32_t)hz; 104 104 LogFlowThisFunc(("mHZ=%u\n", mHZ)); 105 105 … … 107 107 int rc = RTSystemQueryTotalRam(&cb); 108 108 if (RT_FAILURE(rc)) 109 totalRAM = 0;109 mTotalRAM = 0; 110 110 else 111 totalRAM = (ULONG)(cb / 1024);111 mTotalRAM = (ULONG)(cb / 1024); 112 112 } 113 113 … … 212 212 int CollectorLinux::getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available) 213 213 { 214 AssertReturn( totalRAM, VERR_INTERNAL_ERROR);214 AssertReturn(mTotalRAM, VERR_INTERNAL_ERROR); 215 215 uint64_t cb; 216 216 int rc = RTSystemQueryAvailableRam(&cb); 217 217 if (RT_SUCCESS(rc)) 218 218 { 219 *total = totalRAM;220 *available = cb / 1024;219 *total = mTotalRAM; 220 *available = (ULONG)(cb / 1024); 221 221 *used = *total - *available; 222 222 } … … 413 413 char *CollectorLinux::trimNewline(char *pszName) 414 414 { 415 unsignedcbName = strlen(pszName);415 size_t cbName = strlen(pszName); 416 416 if (cbName == 0) 417 417 return pszName; … … 427 427 char *CollectorLinux::trimTrailingDigits(char *pszName) 428 428 { 429 unsignedcbName = strlen(pszName);429 size_t cbName = strlen(pszName); 430 430 if (cbName == 0) 431 431 return pszName; … … 452 452 { 453 453 unsigned cbName = 0; 454 unsignedcbDevName = strlen(pszDevName);454 size_t cbDevName = strlen(pszDevName); 455 455 const char *pszEnd = pszDevName + cbDevName - 1; 456 456 if (fTrimDigits) -
trunk/src/VBox/Main/src-server/linux/USBGetDevices.cpp
r62343 r62363 376 376 * Set the value. 377 377 */ 378 *pu16 = (uint16_t) u32Int << 8 | (uint16_t)u32Dec;378 *pu16 = (uint16_t)((u32Int << 8) | (uint16_t)u32Dec); 379 379 } 380 380 return VINF_SUCCESS; … … 1179 1179 1180 1180 /* usbfs compatibility, 0-based port number. */ 1181 *pu8Port -= 1;1181 *pu8Port = (uint8_t)(*pu8Port - 1); 1182 1182 return VINF_SUCCESS; 1183 1183 } … … 1284 1284 /* Fill in the simple fields */ 1285 1285 pDev->enmState = USBDEVICESTATE_UNUSED; 1286 pDev->bBus = usbsysfsGetBusFromPath(pszSysfsPath);1286 pDev->bBus = (uint8_t)usbsysfsGetBusFromPath(pszSysfsPath); 1287 1287 pDev->bDeviceClass = usbsysfsReadDevicePropertyU8Def(16, 0, "%s/bDeviceClass", pszSysfsPath); 1288 1288 pDev->bDeviceSubClass = usbsysfsReadDevicePropertyU8Def(16, 0, "%s/bDeviceSubClass", pszSysfsPath); -
trunk/src/VBox/Main/src-server/linux/USBProxyBackendLinux.cpp
r61423 r62363 321 321 322 322 RT_ZERO(PollFds); 323 PollFds[0].fd = RTFileToNative(mhFile);323 PollFds[0].fd = (int)RTFileToNative(mhFile); 324 324 PollFds[0].events = POLLIN; 325 PollFds[1].fd = RTPipeToNative(mhWakeupPipeR);325 PollFds[1].fd = (int)RTPipeToNative(mhWakeupPipeR); 326 326 PollFds[1].events = POLLIN | POLLERR | POLLHUP; 327 327
Note:
See TracChangeset
for help on using the changeset viewer.