Changeset 94954 in vbox
- Timestamp:
- May 9, 2022 12:03:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestImpl.cpp
r93468 r94954 247 247 248 248 uint8_t uInstance; 249 int rc = RTStrToUInt8Ex(pszLastSlash, NULL, 10, &uInstance);250 AssertLogRelMsgReturn(RT_SUCCESS( rc) && rc != VWRN_NUMBER_TOO_BIG &&rc != VWRN_NEGATIVE_UNSIGNED,251 ("%Rrc '%s'\n", rc, pszName), VINF_SUCCESS)249 int vrc = RTStrToUInt8Ex(pszLastSlash, NULL, 10, &uInstance); 250 AssertLogRelMsgReturn(RT_SUCCESS(vrc) && vrc != VWRN_NUMBER_TOO_BIG && vrc != VWRN_NEGATIVE_UNSIGNED, 251 ("%Rrc '%s'\n", vrc, pszName), VINF_SUCCESS) 252 252 #endif 253 253 … … 302 302 if (ptrVM.isOk()) 303 303 { 304 int rc;304 int vrc; 305 305 306 306 /* … … 312 312 /* Query the missing per-VM memory statistics. */ 313 313 uint64_t cbTotalMemIgn, cbPrivateMemIgn, cbZeroMemIgn; 314 rc = ptrVM.vtable()->pfnPGMR3QueryMemoryStats(ptrVM.rawUVM(), &cbTotalMemIgn, &cbPrivateMemIgn,315 &cbSharedMem, &cbZeroMemIgn);316 if ( rc == VINF_SUCCESS)314 vrc = ptrVM.vtable()->pfnPGMR3QueryMemoryStats(ptrVM.rawUVM(), &cbTotalMemIgn, &cbPrivateMemIgn, 315 &cbSharedMem, &cbZeroMemIgn); 316 if (vrc == VINF_SUCCESS) 317 317 validStats |= pm::VMSTATMASK_GUEST_MEMSHARED; 318 318 } … … 320 320 if (mCollectVMMStats) 321 321 { 322 rc = ptrVM.vtable()->pfnPGMR3QueryGlobalMemoryStats(ptrVM.rawUVM(), &cbAllocTotal, &cbFreeTotal,323 &cbBalloonedTotal, &cbSharedTotal);324 AssertRC( rc);325 if ( rc == VINF_SUCCESS)322 vrc = ptrVM.vtable()->pfnPGMR3QueryGlobalMemoryStats(ptrVM.rawUVM(), &cbAllocTotal, &cbFreeTotal, 323 &cbBalloonedTotal, &cbSharedTotal); 324 AssertRC(vrc); 325 if (vrc == VINF_SUCCESS) 326 326 validStats |= pm::VMSTATMASK_VMM_ALLOC | pm::VMSTATMASK_VMM_FREE 327 327 | pm::VMSTATMASK_VMM_BALOON | pm::VMSTATMASK_VMM_SHARED; … … 331 331 uint64_t uTxPrev = mNetStatTx; 332 332 mNetStatRx = mNetStatTx = 0; 333 rc = ptrVM.vtable()->pfnSTAMR3Enum(ptrVM.rawUVM(), "/Public/Net/*/Bytes*", i_staticEnumStatsCallback, this);334 AssertRC( rc);333 vrc = ptrVM.vtable()->pfnSTAMR3Enum(ptrVM.rawUVM(), "/Public/Net/*/Bytes*", i_staticEnumStatsCallback, this); 334 AssertRC(vrc); 335 335 336 336 uint64_t uTsNow = RTTimeNanoTS(); … … 709 709 710 710 uint64_t cbFreeTotal, cbAllocTotal, cbBalloonedTotal, cbSharedTotal; 711 int rc = ptrVM.vtable()->pfnPGMR3QueryGlobalMemoryStats(ptrVM.rawUVM(), &cbAllocTotal, &cbFreeTotal,712 &cbBalloonedTotal, &cbSharedTotal);713 AssertRCReturn( rc, E_FAIL);711 int vrc = ptrVM.vtable()->pfnPGMR3QueryGlobalMemoryStats(ptrVM.rawUVM(), &cbAllocTotal, &cbFreeTotal, 712 &cbBalloonedTotal, &cbSharedTotal); 713 AssertRCReturn(vrc, E_FAIL); 714 714 715 715 *aMemAllocTotal = (ULONG)(cbAllocTotal / _1K); /* bytes -> KB */ … … 720 720 /* Query the missing per-VM memory statistics. */ 721 721 uint64_t cbTotalMemIgn, cbPrivateMemIgn, cbSharedMem, cbZeroMemIgn; 722 rc = ptrVM.vtable()->pfnPGMR3QueryMemoryStats(ptrVM.rawUVM(), &cbTotalMemIgn, &cbPrivateMemIgn, &cbSharedMem, &cbZeroMemIgn);723 AssertRCReturn( rc, E_FAIL);722 vrc = ptrVM.vtable()->pfnPGMR3QueryMemoryStats(ptrVM.rawUVM(), &cbTotalMemIgn, &cbPrivateMemIgn, &cbSharedMem, &cbZeroMemIgn); 723 AssertRCReturn(vrc, E_FAIL); 724 724 *aMemShared = (ULONG)(cbSharedMem / _1K); 725 725 … … 813 813 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 814 814 815 HRESULT rc = S_OK;815 HRESULT hrc = S_OK; 816 816 switch (aLevel) 817 817 { … … 829 829 830 830 default: 831 rc = setError(VBOX_E_NOT_SUPPORTED,832 tr("Invalid status level defined: %u"), aLevel);831 hrc = setError(VBOX_E_NOT_SUPPORTED, 832 tr("Invalid status level defined: %u"), aLevel); 833 833 break; 834 834 } 835 835 836 return rc; 837 } 836 return hrc; 837 } 838 838 839 HRESULT Guest::setCredentials(const com::Utf8Str &aUserName, const com::Utf8Str &aPassword, 839 840 const com::Utf8Str &aDomain, BOOL aAllowInteractiveLogon)
Note:
See TracChangeset
for help on using the changeset viewer.