Changeset 98266 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jan 24, 2023 9:46:42 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155469
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r98265 r98266 3787 3787 AssertReturn(enmVMState == VMSTATE_SUSPENDED, VERR_INVALID_STATE); 3788 3788 3789 int hrc = pThis->i_configMediumAttachment(pcszDevice,3789 int vrc = pThis->i_configMediumAttachment(pcszDevice, 3790 3790 uInstance, 3791 3791 enmBus, … … 3806 3806 NULL /* paLedDevType */, 3807 3807 NULL /* ppLunL0 */); 3808 LogFlowFunc(("Returning %Rrc\n", hrc));3809 return hrc;3808 LogFlowFunc(("Returning %Rrc\n", vrc)); 3809 return vrc; 3810 3810 } 3811 3811 … … 3967 3967 AssertReturn(enmVMState == VMSTATE_SUSPENDED, VERR_INVALID_STATE); 3968 3968 3969 int hrc = pThis->i_configMediumAttachment(pcszDevice,3969 int vrc = pThis->i_configMediumAttachment(pcszDevice, 3970 3970 uInstance, 3971 3971 enmBus, … … 3986 3986 NULL /* paLedDevType */, 3987 3987 NULL); 3988 LogFlowFunc(("Returning %Rrc\n", hrc));3989 return hrc;3988 LogFlowFunc(("Returning %Rrc\n", vrc)); 3989 return vrc; 3990 3990 } 3991 3991 … … 5260 5260 { 5261 5261 PPDMIBASE pBase; 5262 int rc2 = ptrVM.vtable()->pfnPDMR3QueryDriverOnLun(ptrVM.rawUVM(),5263 i_getAudioAdapterDeviceName(aAudioAdapter).c_str(),5264 0 /* iInstance */, ulLUN, "AUDIO", &pBase);5265 if (RT_FAILURE( rc2))5262 int vrc2 = ptrVM.vtable()->pfnPDMR3QueryDriverOnLun(ptrVM.rawUVM(), 5263 i_getAudioAdapterDeviceName(aAudioAdapter).c_str(), 5264 0 /* iInstance */, ulLUN, "AUDIO", &pBase); 5265 if (RT_FAILURE(vrc2)) 5266 5266 continue; 5267 5267 … … 6839 6839 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 6840 6840 6841 HRESULT rc = S_OK;6842 6841 for (size_t i = 0; i < aAttachments.size(); ++i) 6843 6842 { … … 6879 6878 6880 6879 BOOL fBuiltinIOCache; 6881 rc = mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache);6882 if (FAILED( rc))6880 hrc = mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache); 6881 if (FAILED(hrc)) 6883 6882 return hrc; 6884 6883 … … 6900 6899 fUseHostIOCache, fBuiltinIOCache, fInsertDiskIntegrityDrv, 6901 6900 false /* fSetupMerge */, 0 /* uMergeSource */, 0 /* uMergeTarget */, 6902 pAttachment, mMachineState, & rc);6901 pAttachment, mMachineState, &hrc); 6903 6902 if (RT_FAILURE(vrc)) 6904 6903 throw setErrorBoth(E_FAIL, vrc, "%Rrc", vrc); … … 6914 6913 HRESULT Console::i_onVMProcessPriorityChange(VMProcPriority_T priority) 6915 6914 { 6916 HRESULT rc = S_OK;6917 6918 6915 AutoCaller autoCaller(this); 6919 if (FAILED(autoCaller.hrc())) 6920 return autoCaller.hrc(); 6916 HRESULT hrc = autoCaller.hrc(); 6917 if (FAILED(hrc)) 6918 return hrc; 6921 6919 6922 6920 RTPROCPRIORITY enmProcPriority = RTPROCPRIORITY_DEFAULT; … … 6943 6941 int vrc = RTProcSetPriority(enmProcPriority); 6944 6942 if (RT_FAILURE(vrc)) 6945 rc = setErrorBoth(VBOX_E_VM_ERROR, vrc,6946 tr("Could not set the priority of the process (%Rrc). Try to set it when VM is not started."), vrc);6947 6948 return rc;6943 hrc = setErrorBoth(VBOX_E_VM_ERROR, vrc, 6944 tr("Could not set the priority of the process (%Rrc). Try to set it when VM is not started."), vrc); 6945 6946 return hrc; 6949 6947 } 6950 6948 … … 7293 7291 autoCaller.release(); 7294 7292 7295 HRESULT rc= i_powerDown();7296 AssertComRC( rc);7293 HRESULT hrc2 = i_powerDown(); 7294 AssertComRC(hrc2); 7297 7295 7298 7296 autoCaller.add(); … … 8246 8244 8247 8245 AutoCaller autoCaller(this); 8248 HRESULT rc = autoCaller.hrc(); 8249 if (FAILED(rc)) return rc; 8246 HRESULT hrc = autoCaller.hrc(); 8247 if (FAILED(hrc)) 8248 return hrc; 8250 8249 8251 8250 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); … … 8259 8258 /* Set up release logging as early as possible after the check if 8260 8259 * there is already a running VM which we shouldn't disturb. */ 8261 rc = i_consoleInitReleaseLog(mMachine);8262 if (FAILED( rc))8263 return rc;8260 hrc = i_consoleInitReleaseLog(mMachine); 8261 if (FAILED(hrc)) 8262 return hrc; 8264 8263 8265 8264 #ifdef VBOX_OPENSSL_FIPS … … 8269 8268 /* test and clear the TeleporterEnabled property */ 8270 8269 BOOL fTeleporterEnabled; 8271 rc = mMachine->COMGETTER(TeleporterEnabled)(&fTeleporterEnabled);8272 if (FAILED( rc))8273 return rc;8270 hrc = mMachine->COMGETTER(TeleporterEnabled)(&fTeleporterEnabled); 8271 if (FAILED(hrc)) 8272 return hrc; 8274 8273 8275 8274 #if 0 /** @todo we should save it afterwards, but that isn't necessarily a good idea. Find a better place for this (VBoxSVC). */ 8276 8275 if (fTeleporterEnabled) 8277 8276 { 8278 rc = mMachine->COMSETTER(TeleporterEnabled)(FALSE);8279 if (FAILED( rc))8280 return rc;8277 hrc = mMachine->COMSETTER(TeleporterEnabled)(FALSE); 8278 if (FAILED(hrc)) 8279 return hrc; 8281 8280 } 8282 8281 #endif … … 8317 8316 { 8318 8317 Bstr bstrSavedStateFile; 8319 rc = mMachine->COMGETTER(StateFilePath)(bstrSavedStateFile.asOutParam());8320 if (FAILED( rc))8321 throw rc;8318 hrc = mMachine->COMGETTER(StateFilePath)(bstrSavedStateFile.asOutParam()); 8319 if (FAILED(hrc)) 8320 throw hrc; 8322 8321 strSavedStateFile = bstrSavedStateFile; 8323 8322 8324 8323 #ifdef VBOX_WITH_FULL_VM_ENCRYPTION 8325 rc = mMachine->COMGETTER(StateKeyId)(bstrStateKeyId.asOutParam());8326 if (FAILED( rc))8327 throw rc;8328 rc = mMachine->COMGETTER(StateKeyStore)(bstrStateKeyStore.asOutParam());8329 if (FAILED( rc))8330 throw rc;8324 hrc = mMachine->COMGETTER(StateKeyId)(bstrStateKeyId.asOutParam()); 8325 if (FAILED(hrc)) 8326 throw hrc; 8327 hrc = mMachine->COMGETTER(StateKeyStore)(bstrStateKeyStore.asOutParam()); 8328 if (FAILED(hrc)) 8329 throw hrc; 8331 8330 #endif 8332 8331 … … 8367 8366 * saved state file (if not yet done). 8368 8367 */ 8369 rc = i_loadDataFromSavedState();8370 if (FAILED( rc))8371 throw rc;8368 hrc = i_loadDataFromSavedState(); 8369 if (FAILED(hrc)) 8370 throw hrc; 8372 8371 8373 8372 /* Check all types of shared folders and compose a single list */ … … 8411 8410 * asynchronously */ 8412 8411 try { task = new VMPowerUpTask(this, pPowerupProgress); } 8413 catch (std::bad_alloc &) { throw rc = E_OUTOFMEMORY; }8412 catch (std::bad_alloc &) { throw hrc = E_OUTOFMEMORY; } 8414 8413 if (!task->isOk()) 8415 8414 throw task->hrc(); … … 8420 8419 if (mMachineState == MachineState_Saved || mMachineState == MachineState_AbortedSaved) 8421 8420 try { task->mSavedStateFile = strSavedStateFile; } 8422 catch (std::bad_alloc &) { throw rc = E_OUTOFMEMORY; }8421 catch (std::bad_alloc &) { throw hrc = E_OUTOFMEMORY; } 8423 8422 task->mTeleporterEnabled = fTeleporterEnabled; 8424 8423 … … 8432 8431 */ 8433 8432 ComPtr<ISnapshot> pCurrentSnapshot; 8434 rc = mMachine->COMGETTER(CurrentSnapshot)(pCurrentSnapshot.asOutParam());8435 if (FAILED( rc))8436 throw rc;8433 hrc = mMachine->COMGETTER(CurrentSnapshot)(pCurrentSnapshot.asOutParam()); 8434 if (FAILED(hrc)) 8435 throw hrc; 8437 8436 8438 8437 BOOL fCurrentSnapshotIsOnline = false; 8439 8438 if (pCurrentSnapshot) 8440 8439 { 8441 rc = pCurrentSnapshot->COMGETTER(Online)(&fCurrentSnapshotIsOnline);8442 if (FAILED( rc))8443 throw rc;8440 hrc = pCurrentSnapshot->COMGETTER(Online)(&fCurrentSnapshotIsOnline); 8441 if (FAILED(hrc)) 8442 throw hrc; 8444 8443 } 8445 8444 … … 8449 8448 8450 8449 com::SafeIfaceArray<IMediumAttachment> atts; 8451 rc = mMachine->COMGETTER(MediumAttachments)(ComSafeArrayAsOutParam(atts));8452 if (FAILED( rc))8453 throw rc;8450 hrc = mMachine->COMGETTER(MediumAttachments)(ComSafeArrayAsOutParam(atts)); 8451 if (FAILED(hrc)) 8452 throw hrc; 8454 8453 8455 8454 for (size_t i = 0; … … 8458 8457 { 8459 8458 DeviceType_T devType; 8460 rc = atts[i]->COMGETTER(Type)(&devType);8459 hrc = atts[i]->COMGETTER(Type)(&devType); 8461 8460 /** @todo later applies to floppies as well */ 8462 8461 if (devType == DeviceType_HardDisk) 8463 8462 { 8464 8463 ComPtr<IMedium> pMedium; 8465 rc = atts[i]->COMGETTER(Medium)(pMedium.asOutParam());8466 if (FAILED( rc))8467 throw rc;8464 hrc = atts[i]->COMGETTER(Medium)(pMedium.asOutParam()); 8465 if (FAILED(hrc)) 8466 throw hrc; 8468 8467 8469 8468 /* needs autoreset? */ 8470 8469 BOOL autoReset = FALSE; 8471 rc = pMedium->COMGETTER(AutoReset)(&autoReset);8472 if (FAILED( rc))8473 throw rc;8470 hrc = pMedium->COMGETTER(AutoReset)(&autoReset); 8471 if (FAILED(hrc)) 8472 throw hrc; 8474 8473 8475 8474 if (autoReset) 8476 8475 { 8477 8476 ComPtr<IProgress> pResetProgress; 8478 rc = pMedium->Reset(pResetProgress.asOutParam());8479 if (FAILED( rc))8480 throw rc;8477 hrc = pMedium->Reset(pResetProgress.asOutParam()); 8478 if (FAILED(hrc)) 8479 throw hrc; 8481 8480 8482 8481 /* save for later use on the powerup thread */ … … 8552 8551 ulTotalOperationsWeight += 1; 8553 8552 } 8554 rc = pPowerupProgress->init(static_cast<IConsole *>(this),8555 progressDesc.raw(),8556 TRUE, // Cancelable8557 cOperations,8558 ulTotalOperationsWeight,8559 tr("Starting Hard Disk operations"),8560 1);8561 AssertComRCReturnRC( rc);8553 hrc = pPowerupProgress->init(static_cast<IConsole *>(this), 8554 progressDesc.raw(), 8555 TRUE, // Cancelable 8556 cOperations, 8557 ulTotalOperationsWeight, 8558 tr("Starting Hard Disk operations"), 8559 1); 8560 AssertComRCReturnRC(hrc); 8562 8561 } 8563 8562 else if ( mMachineState == MachineState_Saved 8564 8563 || mMachineState == MachineState_AbortedSaved 8565 8564 || !fTeleporterEnabled) 8566 rc = pPowerupProgress->init(static_cast<IConsole *>(this),8567 progressDesc.raw(),8568 FALSE /* aCancelable */);8565 hrc = pPowerupProgress->init(static_cast<IConsole *>(this), 8566 progressDesc.raw(), 8567 FALSE /* aCancelable */); 8569 8568 else if (fTeleporterEnabled) 8570 rc = pPowerupProgress->init(static_cast<IConsole *>(this),8571 progressDesc.raw(),8572 TRUE /* aCancelable */,8573 3 /* cOperations */,8574 10 /* ulTotalOperationsWeight */,8575 tr("Teleporting virtual machine"),8576 1 /* ulFirstOperationWeight */);8577 8578 if (FAILED( rc))8579 throw rc;8569 hrc = pPowerupProgress->init(static_cast<IConsole *>(this), 8570 progressDesc.raw(), 8571 TRUE /* aCancelable */, 8572 3 /* cOperations */, 8573 10 /* ulTotalOperationsWeight */, 8574 tr("Teleporting virtual machine"), 8575 1 /* ulFirstOperationWeight */); 8576 8577 if (FAILED(hrc)) 8578 throw hrc; 8580 8579 8581 8580 /* Tell VBoxSVC and Machine about the progress object so they can 8582 8581 combine/proxy it to any openRemoteSession caller. */ 8583 8582 LogFlowThisFunc(("Calling BeginPowerUp...\n")); 8584 rc = mControl->BeginPowerUp(pPowerupProgress);8585 if (FAILED( rc))8583 hrc = mControl->BeginPowerUp(pPowerupProgress); 8584 if (FAILED(hrc)) 8586 8585 { 8587 8586 LogFlowThisFunc(("BeginPowerUp failed\n")); 8588 throw rc;8587 throw hrc; 8589 8588 } 8590 8589 fBeganPoweringUp = true; … … 8592 8591 LogFlowThisFunc(("Checking if canceled...\n")); 8593 8592 BOOL fCanceled; 8594 rc = pPowerupProgress->COMGETTER(Canceled)(&fCanceled);8595 if (FAILED( rc))8596 throw rc;8593 hrc = pPowerupProgress->COMGETTER(Canceled)(&fCanceled); 8594 if (FAILED(hrc)) 8595 throw hrc; 8597 8596 8598 8597 if (fCanceled) … … 8658 8657 if (aProgress) 8659 8658 { 8660 rc = pPowerupProgress.queryInterfaceTo(aProgress);8661 AssertComRCReturnRC( rc);8659 hrc = pPowerupProgress.queryInterfaceTo(aProgress); 8660 AssertComRCReturnRC(hrc); 8662 8661 } 8663 8662 … … 8668 8667 #endif 8669 8668 8670 rc = task->createThread();8669 hrc = task->createThread(); 8671 8670 task = NULL; 8672 if (FAILED( rc))8673 throw rc;8671 if (FAILED(hrc)) 8672 throw hrc; 8674 8673 8675 8674 /* finally, set the state: no right to fail in this method afterwards … … 8685 8684 catch (HRESULT aRC) 8686 8685 { 8687 rc = aRC;8688 } 8689 8690 if (FAILED( rc) && fBeganPoweringUp)8686 hrc = aRC; 8687 } 8688 8689 if (FAILED(hrc) && fBeganPoweringUp) 8691 8690 { 8692 8691 8693 8692 /* The progress object will fetch the current error info */ 8694 8693 if (!pPowerupProgress.isNull()) 8695 pPowerupProgress->i_notifyComplete( rc);8694 pPowerupProgress->i_notifyComplete(hrc); 8696 8695 8697 8696 /* Save the error info across the IPC below. Can't be done before the … … 8702 8701 8703 8702 /* signal end of operation */ 8704 mControl->EndPowerUp( rc);8703 mControl->EndPowerUp(hrc); 8705 8704 } 8706 8705 … … 8711 8710 } 8712 8711 8713 LogFlowThisFunc(("mMachineState=%d, rc=%Rhrc\n", mMachineState,rc));8712 LogFlowThisFunc(("mMachineState=%d, hrc=%Rhrc\n", mMachineState, hrc)); 8714 8713 LogFlowThisFuncLeave(); 8715 return rc;8714 return hrc; 8716 8715 } 8717 8716 … … 8761 8760 ULONG step = 0; 8762 8761 8763 HRESULT rc = S_OK;8762 HRESULT hrc = S_OK; 8764 8763 int vrc = VINF_SUCCESS; 8765 8764 … … 8992 8991 mpUVM = pUVM; 8993 8992 pUVM = NULL; 8994 rc = setErrorBoth(VBOX_E_VM_ERROR, vrc, tr("Could not destroy the machine. (Error: %Rrc)"), vrc);8993 hrc = setErrorBoth(VBOX_E_VM_ERROR, vrc, tr("Could not destroy the machine. (Error: %Rrc)"), vrc); 8995 8994 } 8996 8995 … … 9008 9007 } 9009 9008 else 9010 rc = setErrorBoth(VBOX_E_VM_ERROR, vrc, tr("Could not power off the machine. (Error: %Rrc)"), vrc);9009 hrc = setErrorBoth(VBOX_E_VM_ERROR, vrc, tr("Could not power off the machine. (Error: %Rrc)"), vrc); 9011 9010 9012 9011 /* … … 9024 9023 9025 9024 LogFlowThisFuncLeave(); 9026 return rc;9025 return hrc; 9027 9026 } 9028 9027 … … 9037 9036 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 9038 9037 9039 HRESULT rc = S_OK;9038 HRESULT hrc = S_OK; 9040 9039 9041 9040 if (mMachineState != aMachineState) … … 9073 9072 */ 9074 9073 LogFlowThisFunc(("Doing mControl->UpdateState()...\n")); 9075 rc = mControl->UpdateState(aMachineState);9076 LogFlowThisFunc(("mControl->UpdateState()=%Rhrc\n", rc));9077 } 9078 } 9079 9080 return rc;9074 hrc = mControl->UpdateState(aMachineState); 9075 LogFlowThisFunc(("mControl->UpdateState()=%Rhrc\n", hrc)); 9076 } 9077 } 9078 9079 return hrc; 9081 9080 } 9082 9081 … … 9133 9132 && m_pVMMDev->isShFlActive(); 9134 9133 9135 HRESULT rc = S_OK;9134 HRESULT hrc = S_OK; 9136 9135 9137 9136 try … … 9150 9149 9151 9150 SafeIfaceArray<ISharedFolder> folders; 9152 rc = mMachine->COMGETTER(SharedFolders)(ComSafeArrayAsOutParam(folders));9153 if (FAILED( rc)) throwrc;9151 hrc = mMachine->COMGETTER(SharedFolders)(ComSafeArrayAsOutParam(folders)); 9152 if (FAILED(hrc)) throw hrc; 9154 9153 9155 9154 for (size_t i = 0; i < folders.size(); ++i) … … 9158 9157 9159 9158 Bstr bstr; 9160 rc = pSharedFolder->COMGETTER(Name)(bstr.asOutParam());9161 if (FAILED( rc)) throwrc;9159 hrc = pSharedFolder->COMGETTER(Name)(bstr.asOutParam()); 9160 if (FAILED(hrc)) throw hrc; 9162 9161 Utf8Str strName(bstr); 9163 9162 9164 rc = pSharedFolder->COMGETTER(HostPath)(bstr.asOutParam());9165 if (FAILED( rc)) throwrc;9163 hrc = pSharedFolder->COMGETTER(HostPath)(bstr.asOutParam()); 9164 if (FAILED(hrc)) throw hrc; 9166 9165 Utf8Str strHostPath(bstr); 9167 9166 9168 9167 BOOL writable; 9169 rc = pSharedFolder->COMGETTER(Writable)(&writable);9170 if (FAILED( rc)) throwrc;9168 hrc = pSharedFolder->COMGETTER(Writable)(&writable); 9169 if (FAILED(hrc)) throw hrc; 9171 9170 9172 9171 BOOL autoMount; 9173 rc = pSharedFolder->COMGETTER(AutoMount)(&autoMount);9174 if (FAILED( rc)) throwrc;9175 9176 rc = pSharedFolder->COMGETTER(AutoMountPoint)(bstr.asOutParam());9177 if (FAILED( rc)) throwrc;9172 hrc = pSharedFolder->COMGETTER(AutoMount)(&autoMount); 9173 if (FAILED(hrc)) throw hrc; 9174 9175 hrc = pSharedFolder->COMGETTER(AutoMountPoint)(bstr.asOutParam()); 9176 if (FAILED(hrc)) throw hrc; 9178 9177 Utf8Str strAutoMountPoint(bstr); 9179 9178 … … 9201 9200 ) 9202 9201 { 9203 rc = i_removeSharedFolder(strName);9204 if (FAILED( rc)) throwrc;9202 hrc = i_removeSharedFolder(strName); 9203 if (FAILED(hrc)) throw hrc; 9205 9204 } 9206 9205 9207 9206 /* create the new machine folder */ 9208 rc = i_createSharedFolder(strName,9209 SharedFolderData(strHostPath, !!writable, !!autoMount, strAutoMountPoint));9210 if (FAILED( rc)) throwrc;9207 hrc = i_createSharedFolder(strName, 9208 SharedFolderData(strHostPath, !!writable, !!autoMount, strAutoMountPoint)); 9209 if (FAILED(hrc)) throw hrc; 9211 9210 } 9212 9211 } … … 9228 9227 { 9229 9228 /* remove the outdated machine folder */ 9230 rc = i_removeSharedFolder(it->first);9231 if (FAILED( rc)) throwrc;9229 hrc = i_removeSharedFolder(it->first); 9230 if (FAILED(hrc)) throw hrc; 9232 9231 9233 9232 /* create the global folder if there is any */ … … 9236 9235 if (git != m_mapGlobalSharedFolders.end()) 9237 9236 { 9238 rc = i_createSharedFolder(git->first, git->second);9239 if (FAILED( rc)) throwrc;9237 hrc = i_createSharedFolder(git->first, git->second); 9238 if (FAILED(hrc)) throw hrc; 9240 9239 } 9241 9240 } … … 9244 9243 } 9245 9244 } 9246 catch (HRESULT rc2)9247 { 9248 rc =rc2;9245 catch (HRESULT hrc2) 9246 { 9247 hrc = hrc2; 9249 9248 if (online) 9250 9249 i_atVMRuntimeErrorCallbackF(0, "BrokenSharedFolder", N_("Broken shared folder!")); … … 9253 9252 LogFlowThisFunc(("Leaving\n")); 9254 9253 9255 return rc;9254 return hrc; 9256 9255 } 9257 9256 … … 9644 9643 */ 9645 9644 ComPtr<IProgress> pProgress; 9646 HRESULT rc = that->mControl->BeginPoweringDown(pProgress.asOutParam());9647 AssertComRC( rc);9645 HRESULT hrc = that->mControl->BeginPoweringDown(pProgress.asOutParam()); 9646 AssertComRC(hrc); 9648 9647 9649 9648 /* sync the state with the server */ … … 9664 9663 { 9665 9664 LogRelFunc(("E_OUTOFMEMORY creating VMPowerDownTask")); 9666 rc = E_OUTOFMEMORY;9665 hrc = E_OUTOFMEMORY; 9667 9666 break; 9668 9667 } … … 9677 9676 if (pTask->isOk()) 9678 9677 { 9679 rc = pTask->createThread();9678 hrc = pTask->createThread(); 9680 9679 pTask = NULL; 9681 if (FAILED( rc))9680 if (FAILED(hrc)) 9682 9681 LogRelFunc(("Problem with creating thread for VMPowerDownTask.\n")); 9683 9682 } … … 9687 9686 delete pTask; 9688 9687 pTask = NULL; 9689 rc = E_FAIL;9688 hrc = E_FAIL; 9690 9689 } 9691 9690 } … … 9716 9715 { 9717 9716 ComPtr<IVirtualBox> pVirtualBox; 9718 HRESULT rc = that->mMachine->COMGETTER(Parent)(pVirtualBox.asOutParam());9719 AssertComRC( rc);9720 if (SUCCEEDED( rc) && !pVirtualBox.isNull())9717 HRESULT hrc = that->mMachine->COMGETTER(Parent)(pVirtualBox.asOutParam()); 9718 AssertComRC(hrc); 9719 if (SUCCEEDED(hrc) && !pVirtualBox.isNull()) 9721 9720 stopCloudGateway(pVirtualBox, that->mGateway); 9722 9721 } … … 10044 10043 } 10045 10044 10046 int rc = pVMMDev->hgcmHostCall("VBoxDragAndDropSvc", DragAndDropSvc::HOST_DND_FN_SET_MODE, 1 /* cParms */, &parm);10047 if (RT_FAILURE( rc))10048 LogRel(("Error changing drag and drop mode: %Rrc\n", rc));10049 10050 return rc;10045 int vrc = pVMMDev->hgcmHostCall("VBoxDragAndDropSvc", DragAndDropSvc::HOST_DND_FN_SET_MODE, 1 /* cParms */, &parm); 10046 if (RT_FAILURE(vrc)) 10047 LogRel(("Error changing drag and drop mode: %Rrc\n", vrc)); 10048 10049 return vrc; 10051 10050 } 10052 10051 … … 10328 10327 # endif /* VBOX_STRICT */ 10329 10328 10330 HRESULT rc = S_OK;10331 10332 10329 ULONG slot = 0; 10333 rc = networkAdapter->COMGETTER(Slot)(&slot);10334 AssertComRC (rc);10330 HRESULT hrc = networkAdapter->COMGETTER(Slot)(&slot); 10331 AssertComRCReturnRC(hrc); 10335 10332 10336 10333 # ifdef RT_OS_LINUX … … 10349 10346 /* The name of the TAP interface we are using */ 10350 10347 Bstr tapDeviceName; 10351 rc = networkAdapter->COMGETTER(BridgedInterface)(tapDeviceName.asOutParam());10352 if (FAILED( rc))10348 hrc = networkAdapter->COMGETTER(BridgedInterface)(tapDeviceName.asOutParam()); 10349 if (FAILED(hrc)) 10353 10350 tapDeviceName.setNull(); /* Is this necessary? */ 10354 10351 if (tapDeviceName.isEmpty()) 10355 10352 { 10356 10353 LogRel(("No TAP device name was supplied.\n")); 10357 rc = setError(E_FAIL, tr("No TAP device name was supplied for the host networking interface"));10358 } 10359 10360 if (SUCCEEDED( rc))10354 hrc = setError(E_FAIL, tr("No TAP device name was supplied for the host networking interface")); 10355 } 10356 10357 if (SUCCEEDED(hrc)) 10361 10358 { 10362 10359 /* If we are using a static TAP device then try to open it. */ … … 10368 10365 { 10369 10366 LogRel(("Failed to open the host network interface %ls\n", tapDeviceName.raw())); 10370 rc = setErrorBoth(E_FAIL, vrc, tr("Failed to open the host network interface %ls"), tapDeviceName.raw());10367 hrc = setErrorBoth(E_FAIL, vrc, tr("Failed to open the host network interface %ls"), tapDeviceName.raw()); 10371 10368 } 10372 10369 } 10373 if (SUCCEEDED( rc))10370 if (SUCCEEDED(hrc)) 10374 10371 { 10375 10372 /* … … 10393 10390 LogRel(("Configuration error: Failed to configure /dev/net/tun non blocking. Error: %s\n", strerror(iErr))); 10394 10391 vrc = VERR_HOSTIF_BLOCKING; 10395 rc = setErrorBoth(E_FAIL, vrc, tr("could not set up the host networking device for non blocking access: %s"),10396 strerror(errno));10392 hrc = setErrorBoth(E_FAIL, vrc, tr("could not set up the host networking device for non blocking access: %s"), 10393 strerror(errno)); 10397 10394 } 10398 10395 } … … 10400 10397 else 10401 10398 { 10402 LogRel(("Configuration error: Failed to open /dev/net/tun rc=%Rrc\n", vrc));10399 LogRel(("Configuration error: Failed to open /dev/net/tun vrc=%Rrc\n", vrc)); 10403 10400 switch (vrc) 10404 10401 { 10405 10402 case VERR_ACCESS_DENIED: 10406 10403 /* will be handled by our caller */ 10407 rc = E_ACCESSDENIED;10404 hrc = E_ACCESSDENIED; 10408 10405 break; 10409 10406 default: 10410 rc = setErrorBoth(E_FAIL, vrc, tr("Could not set up the host networking device: %Rrc"), vrc);10407 hrc = setErrorBoth(E_FAIL, vrc, tr("Could not set up the host networking device: %Rrc"), vrc); 10411 10408 break; 10412 10409 } … … 10419 10416 /* The name of the TAP interface we are using */ 10420 10417 Bstr tapDeviceName; 10421 rc = networkAdapter->COMGETTER(BridgedInterface)(tapDeviceName.asOutParam());10422 if (FAILED( rc))10418 hrc = networkAdapter->COMGETTER(BridgedInterface)(tapDeviceName.asOutParam()); 10419 if (FAILED(hrc)) 10423 10420 tapDeviceName.setNull(); /* Is this necessary? */ 10424 10421 if (tapDeviceName.isEmpty()) 10425 10422 { 10426 10423 LogRel(("No TAP device name was supplied.\n")); 10427 rc = setError(E_FAIL, tr("No TAP device name was supplied for the host networking interface"));10424 hrc = setError(E_FAIL, tr("No TAP device name was supplied for the host networking interface")); 10428 10425 } 10429 10426 char szTapdev[1024] = "/dev/"; … … 10446 10443 case VERR_ACCESS_DENIED: 10447 10444 /* will be handled by our caller */ 10448 rc = E_ACCESSDENIED;10445 hrc = E_ACCESSDENIED; 10449 10446 break; 10450 10447 default: 10451 rc = setErrorBoth(E_FAIL, vrc, tr("Failed to open the host network interface %ls"), tapDeviceName.raw());10448 hrc = setErrorBoth(E_FAIL, vrc, tr("Failed to open the host network interface %ls"), tapDeviceName.raw()); 10452 10449 break; 10453 10450 } … … 10457 10454 # endif 10458 10455 /* in case of failure, cleanup. */ 10459 if (RT_FAILURE(vrc) && SUCCEEDED( rc))10456 if (RT_FAILURE(vrc) && SUCCEEDED(hrc)) 10460 10457 { 10461 10458 LogRel(("General failure attaching to host interface\n")); 10462 rc = setErrorBoth(E_FAIL, vrc, tr("General failure attaching to host interface"));10463 } 10464 LogFlowThisFunc((" rc=%Rhrc\n",rc));10465 return rc;10459 hrc = setErrorBoth(E_FAIL, vrc, tr("General failure attaching to host interface")); 10460 } 10461 LogFlowThisFunc(("hrc=%Rhrc\n", hrc)); 10462 return hrc; 10466 10463 } 10467 10464 … … 10483 10480 AssertReturn(isWriteLockOnCurrentThread(), E_FAIL); 10484 10481 10485 HRESULT rc = S_OK;10486 10482 # ifdef VBOX_STRICT 10487 10483 /* paranoia */ … … 10492 10488 10493 10489 ULONG slot = 0; 10494 rc = networkAdapter->COMGETTER(Slot)(&slot);10495 AssertComRC (rc);10490 HRESULT hrc = networkAdapter->COMGETTER(Slot)(&slot); 10491 AssertComRCReturnRC(hrc); 10496 10492 10497 10493 /* is there an open TAP device? */ … … 10503 10499 Bstr tapDeviceName, tapTerminateApplication; 10504 10500 bool isStatic = true; 10505 rc = networkAdapter->COMGETTER(BridgedInterface)(tapDeviceName.asOutParam());10506 if (FAILED( rc) || tapDeviceName.isEmpty())10501 hrc = networkAdapter->COMGETTER(BridgedInterface)(tapDeviceName.asOutParam()); 10502 if (FAILED(hrc) || tapDeviceName.isEmpty()) 10507 10503 { 10508 10504 /* If the name is empty, this is a dynamic TAP device, so close it now, … … 10510 10506 need the FD to pass to the termination script. */ 10511 10507 isStatic = false; 10512 int rcVBox= RTFileClose(maTapFD[slot]);10513 AssertRC( rcVBox);10508 int vrc = RTFileClose(maTapFD[slot]); 10509 AssertRC(vrc); 10514 10510 maTapFD[slot] = NIL_RTFILE; 10515 10511 } … … 10518 10514 /* If we are using a static TAP device, we close it now, after having called the 10519 10515 termination script. */ 10520 int rcVBox= RTFileClose(maTapFD[slot]);10521 AssertRC( rcVBox);10516 int vrc = RTFileClose(maTapFD[slot]); 10517 AssertRC(vrc); 10522 10518 } 10523 10519 /* the TAP device name and handle are no longer valid */ … … 10525 10521 maTAPDeviceName[slot] = ""; 10526 10522 } 10527 LogFlowThisFunc(("returning % d\n",rc));10528 return rc;10523 LogFlowThisFunc(("returning %Rhrc\n", hrc)); 10524 return hrc; 10529 10525 } 10530 10526 … … 10546 10542 * host interface termination handling 10547 10543 */ 10548 HRESULT rc = S_OK;10549 10544 ComPtr<IVirtualBox> pVirtualBox; 10550 10545 mMachine->COMGETTER(Parent)(pVirtualBox.asOutParam()); … … 10558 10553 pSystemProperties->GetMaxNetworkAdapters(chipsetType, &maxNetworkAdapters); 10559 10554 10555 HRESULT hrc = S_OK; 10560 10556 for (ULONG slot = 0; slot < maxNetworkAdapters; slot++) 10561 10557 { 10562 10558 ComPtr<INetworkAdapter> pNetworkAdapter; 10563 rc = mMachine->GetNetworkAdapter(slot, pNetworkAdapter.asOutParam());10564 if (FAILED( rc)) break;10559 hrc = mMachine->GetNetworkAdapter(slot, pNetworkAdapter.asOutParam()); 10560 if (FAILED(hrc)) break; 10565 10561 10566 10562 BOOL enabled = FALSE; … … 10574 10570 { 10575 10571 #if ((defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) && !defined(VBOX_WITH_NETFLT)) 10576 HRESULT rc2 = i_detachFromTapInterface(pNetworkAdapter);10577 if (FAILED( rc2) && SUCCEEDED(rc))10578 rc =rc2;10572 HRESULT hrc2 = i_detachFromTapInterface(pNetworkAdapter); 10573 if (FAILED(hrc2) && SUCCEEDED(hrc)) 10574 hrc = hrc2; 10579 10575 #endif /* (RT_OS_LINUX || RT_OS_FREEBSD) && !VBOX_WITH_NETFLT */ 10580 10576 } 10581 10577 } 10582 10578 10583 return rc;10579 return hrc; 10584 10580 } 10585 10581 … … 10618 10614 */ 10619 10615 /*static*/ DECLCALLBACK(void) 10620 Console::i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args)10616 Console::i_genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int vrc, RT_SRC_POS_DECL, const char *pszFormat, va_list args) 10621 10617 { 10622 10618 RT_SRC_POS_NOREF(); … … 10632 10628 { 10633 10629 if (pErrorText->length()) 10634 pErrorText->appendPrintf(".\n%N (%Rrc)", pszFormat, &va2, rc,rc);10630 pErrorText->appendPrintf(".\n%N (%Rrc)", pszFormat, &va2, vrc, vrc); 10635 10631 else 10636 pErrorText->printf("%N (%Rrc)", pszFormat, &va2, rc,rc);10632 pErrorText->printf("%N (%Rrc)", pszFormat, &va2, vrc, vrc); 10637 10633 } 10638 10634 catch (std::bad_alloc &) … … 10925 10921 VirtualBoxBase::initializeComForThread(); 10926 10922 10927 HRESULT rc = S_OK;10923 HRESULT hrc = S_OK; 10928 10924 int vrc = VINF_SUCCESS; 10929 10925 … … 10962 10958 it != pTask->hardDiskProgresses.end(); ++it) 10963 10959 { 10964 HRESULT rc2 = (*it)->WaitForCompletion(-1);10965 AssertComRC( rc2);10966 10967 rc = pTask->mProgress->SetNextOperation(BstrFmt(tr("Disk Image Reset Operation - Immutable Image")).raw(), 1);10968 AssertComRCReturnVoid( rc);10960 HRESULT hrc2 = (*it)->WaitForCompletion(-1); 10961 AssertComRC(hrc2); 10962 10963 hrc = pTask->mProgress->SetNextOperation(BstrFmt(tr("Disk Image Reset Operation - Immutable Image")).raw(), 1); 10964 AssertComRCReturnVoid(hrc); 10969 10965 } 10970 10966 … … 10979 10975 if (!pTask->mTeleporterEnabled) 10980 10976 { 10981 rc = pConsole->mControl->LockMedia();10982 if (FAILED( rc)) throwrc;10977 hrc = pConsole->mControl->LockMedia(); 10978 if (FAILED(hrc)) throw hrc; 10983 10979 } 10984 10980 … … 11073 11069 { 11074 11070 const SharedFolderData &d = it->second; 11075 rc = pConsole->i_createSharedFolder(it->first, d);11076 if (FAILED( rc))11071 hrc = pConsole->i_createSharedFolder(it->first, d); 11072 if (FAILED(hrc)) 11077 11073 { 11078 11074 ErrorInfoKeeper eik; … … 11084 11080 } 11085 11081 } 11086 if (FAILED( rc))11087 rc = S_OK; // do not fail with broken shared folders11082 if (FAILED(hrc)) 11083 hrc = S_OK; // do not fail with broken shared folders 11088 11084 11089 11085 /* acquire the lock again */ … … 11098 11094 { 11099 11095 BOOL fVRDEEnabled = FALSE; 11100 rc = pConsole->i_getVRDEServer()->COMGETTER(Enabled)(&fVRDEEnabled);11101 AssertComRCBreak( rc, RT_NOTHING);11096 hrc = pConsole->i_getVRDEServer()->COMGETTER(Enabled)(&fVRDEEnabled); 11097 AssertComRCBreak(hrc, RT_NOTHING); 11102 11098 11103 11099 if ( fVRDEEnabled … … 11119 11115 { 11120 11116 ComPtr<IRecordingSettings> ptrRecordingSettings; 11121 rc = pConsole->mMachine->COMGETTER(RecordingSettings)(ptrRecordingSettings.asOutParam());11122 AssertComRCBreak( rc, RT_NOTHING);11123 11124 rc = ptrRecordingSettings->COMGETTER(Enabled)(&fRecordingEnabled);11125 AssertComRCBreak( rc, RT_NOTHING);11117 hrc = pConsole->mMachine->COMGETTER(RecordingSettings)(ptrRecordingSettings.asOutParam()); 11118 AssertComRCBreak(hrc, RT_NOTHING); 11119 11120 hrc = ptrRecordingSettings->COMGETTER(Enabled)(&fRecordingEnabled); 11121 AssertComRCBreak(hrc, RT_NOTHING); 11126 11122 } 11127 11123 if (fRecordingEnabled) … … 11144 11140 * Capture USB devices. 11145 11141 */ 11146 rc = pConsole->i_captureUSBDevices(pConsole->mpUVM);11147 if (FAILED( rc))11142 hrc = pConsole->i_captureUSBDevices(pConsole->mpUVM); 11143 if (FAILED(hrc)) 11148 11144 { 11149 11145 alock.acquire(); … … 11211 11207 /* -> ConsoleImplTeleporter.cpp */ 11212 11208 bool fPowerOffOnFailure; 11213 rc = pConsole->i_teleporterTrg(pConsole->mpUVM, pConsole->mpVMM, pMachine, &pTask->mErrorMsg,11214 pTask->mStartPaused, pTask->mProgress, &fPowerOffOnFailure);11215 if (FAILED( rc) && fPowerOffOnFailure)11209 hrc = pConsole->i_teleporterTrg(pConsole->mpUVM, pConsole->mpVMM, pMachine, &pTask->mErrorMsg, 11210 pTask->mStartPaused, pTask->mProgress, &fPowerOffOnFailure); 11211 if (FAILED(hrc) && fPowerOffOnFailure) 11216 11212 { 11217 11213 ErrorInfoKeeper eik; … … 11242 11238 11243 11239 /* On failure, destroy the VM */ 11244 if (FAILED( rc) || RT_FAILURE(vrc))11240 if (FAILED(hrc) || RT_FAILURE(vrc)) 11245 11241 { 11246 11242 /* preserve existing error info */ … … 11250 11246 * cleanup (VRDP, USB devices) */ 11251 11247 alock.release(); 11252 HRESULT rc2 = pConsole->i_powerDown();11248 HRESULT hrc2 = pConsole->i_powerDown(); 11253 11249 alock.acquire(); 11254 AssertComRC( rc2);11250 AssertComRC(hrc2); 11255 11251 } 11256 11252 else … … 11282 11278 } 11283 11279 11284 if (SUCCEEDED( rc) && RT_FAILURE(vrc))11280 if (SUCCEEDED(hrc) && RT_FAILURE(vrc)) 11285 11281 { 11286 11282 /* If VMR3Create() or one of the other calls in this function fail, 11287 11283 * an appropriate error message has been set in pTask->mErrorMsg. 11288 * However since that happens via a callback, the rc status code in11284 * However since that happens via a callback, the hrc status code in 11289 11285 * this function is not updated. 11290 11286 */ … … 11305 11301 } 11306 11302 } 11307 catch (HRESULT aRC) { rc = aRC; }11303 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 11308 11304 11309 11305 if ( pConsole->mMachineState == MachineState_Starting … … 11337 11333 alock.release(); 11338 11334 11339 if (SUCCEEDED( rc))11335 if (SUCCEEDED(hrc)) 11340 11336 { 11341 11337 /* Notify the progress object of the success */ … … 11345 11341 { 11346 11342 /* The progress object will fetch the current error info */ 11347 pTask->mProgress->i_notifyComplete( rc);11348 LogRel(("Power up failed (vrc=%Rrc, rc=%Rhrc (%#08X))\n", vrc, rc,rc));11343 pTask->mProgress->i_notifyComplete(hrc); 11344 LogRel(("Power up failed (vrc=%Rrc, hrc=%Rhrc (%#08X))\n", vrc, hrc, hrc)); 11349 11345 } 11350 11346 11351 11347 /* Notify VBoxSVC and any waiting openRemoteSession progress object. */ 11352 pConsole->mControl->EndPowerUp( rc);11348 pConsole->mControl->EndPowerUp(hrc); 11353 11349 11354 11350 #if defined(RT_OS_WINDOWS) … … 11414 11410 11415 11411 /* Update the device instance configuration. */ 11416 int rc = pThis->i_configMediumAttachment(pcszDevice,11417 uInstance,11418 enmBus,11419 fUseHostIOCache,11420 fBuiltinIOCache,11421 fInsertDiskIntegrityDrv,11422 fSetupMerge,11423 uMergeSource,11424 uMergeTarget,11425 aMediumAtt,11426 aMachineState,11427 phrc,11428 true /* fAttachDetach */,11429 false /* fForceUnmount */,11430 false /* fHotplug */,11431 pUVM,11432 pVMM,11433 NULL /* paLedDevType */,11434 NULL /* ppLunL0)*/);11435 if (RT_FAILURE( rc))11436 { 11437 AssertMsgFailed((" rc=%Rrc\n",rc));11438 return rc;11412 int vrc = pThis->i_configMediumAttachment(pcszDevice, 11413 uInstance, 11414 enmBus, 11415 fUseHostIOCache, 11416 fBuiltinIOCache, 11417 fInsertDiskIntegrityDrv, 11418 fSetupMerge, 11419 uMergeSource, 11420 uMergeTarget, 11421 aMediumAtt, 11422 aMachineState, 11423 phrc, 11424 true /* fAttachDetach */, 11425 false /* fForceUnmount */, 11426 false /* fHotplug */, 11427 pUVM, 11428 pVMM, 11429 NULL /* paLedDevType */, 11430 NULL /* ppLunL0)*/); 11431 if (RT_FAILURE(vrc)) 11432 { 11433 AssertMsgFailed(("vrc=%Rrc\n", vrc)); 11434 return vrc; 11439 11435 } 11440 11436 … … 11455 11451 void Console::i_powerDownThreadTask(VMPowerDownTask *pTask) 11456 11452 { 11457 int rc = VINF_SUCCESS; /* only used in assertion */11453 int vrc = VINF_SUCCESS; /* only used in assertion */ 11458 11454 LogFlowFuncEnter(); 11459 11455 try 11460 11456 { 11461 11457 if (pTask->isOk() == false) 11462 rc = VERR_GENERAL_FAILURE;11458 vrc = VERR_GENERAL_FAILURE; 11463 11459 11464 11460 const ComObjPtr<Console> &that = pTask->mConsole; … … 11483 11479 catch (const std::exception &e) 11484 11480 { 11485 AssertMsgFailed(("Exception %s was caught, rc=%Rrc\n", e.what(),rc));11486 NOREF(e); NOREF( rc);11481 AssertMsgFailed(("Exception %s was caught, vrc=%Rrc\n", e.what(), vrc)); 11482 NOREF(e); NOREF(vrc); 11487 11483 } 11488 11484 … … 11654 11650 SecretKey *pKey = NULL; 11655 11651 11656 int rc = pConsole->m_pKeyStore->retainSecretKey(Utf8Str(pszId), &pKey);11657 if (RT_SUCCESS( rc))11652 int vrc = pConsole->m_pKeyStore->retainSecretKey(Utf8Str(pszId), &pKey); 11653 if (RT_SUCCESS(vrc)) 11658 11654 { 11659 11655 *ppbKey = (const uint8_t *)pKey->getKeyBuffer(); … … 11661 11657 } 11662 11658 11663 return rc;11659 return vrc; 11664 11660 } 11665 11661 … … 11687 11683 SecretKey *pKey = NULL; 11688 11684 11689 int rc = pConsole->m_pKeyStore->retainSecretKey(Utf8Str(pszId), &pKey);11690 if (RT_SUCCESS( rc))11685 int vrc = pConsole->m_pKeyStore->retainSecretKey(Utf8Str(pszId), &pKey); 11686 if (RT_SUCCESS(vrc)) 11691 11687 *ppszPassword = (const char *)pKey->getKeyBuffer(); 11692 11688 11693 return rc;11689 return vrc; 11694 11690 } 11695 11691 … … 11775 11771 */ 11776 11772 PPDMLED pLed; 11777 int rc = pThis->pLedPorts->pfnQueryStatusLed(pThis->pLedPorts, iLUN, &pLed);11778 if (RT_FAILURE( rc))11773 int vrc = pThis->pLedPorts->pfnQueryStatusLed(pThis->pLedPorts, iLUN, &pLed); 11774 if (RT_FAILURE(vrc)) 11779 11775 pLed = NULL; 11780 11776 … … 11824 11820 { 11825 11821 IMedium *pMedium = NULL; 11826 HRESULT rc = pMediumAtt->COMGETTER(Medium)(&pMedium);11827 AssertComRC( rc);11828 if (SUCCEEDED( rc) && pMedium)11822 HRESULT hrc = pMediumAtt->COMGETTER(Medium)(&pMedium); 11823 AssertComRC(hrc); 11824 if (SUCCEEDED(hrc) && pMedium) 11829 11825 { 11830 11826 BOOL fHostDrive = FALSE; 11831 rc = pMedium->COMGETTER(HostDrive)(&fHostDrive);11832 AssertComRC( rc);11827 hrc = pMedium->COMGETTER(HostDrive)(&fHostDrive); 11828 AssertComRC(hrc); 11833 11829 if (!fHostDrive) 11834 11830 { … … 11836 11832 11837 11833 ComPtr<IMediumAttachment> pNewMediumAtt; 11838 rc = pThis->pConsole->mControl->EjectMedium(pMediumAtt, pNewMediumAtt.asOutParam());11839 if (SUCCEEDED( rc))11834 hrc = pThis->pConsole->mControl->EjectMedium(pMediumAtt, pNewMediumAtt.asOutParam()); 11835 if (SUCCEEDED(hrc)) 11840 11836 { 11841 11837 pThis->pConsole->mMachine->SaveSettings(); … … 11942 11938 11943 11939 uint32_t iLedSet; 11944 int rc = pHlp->pfnCFGMQueryU32(pCfg, "iLedSet", &iLedSet);11945 AssertLogRelMsgRCReturn( rc, ("Configuration error: Failed to query the \"iLedSet\" value! rc=%Rrc\n", rc),rc);11940 int vrc = pHlp->pfnCFGMQueryU32(pCfg, "iLedSet", &iLedSet); 11941 AssertLogRelMsgRCReturn(vrc, ("Configuration error: Failed to query the \"iLedSet\" value! vrc=%Rrc\n", vrc), vrc); 11946 11942 pThis->papLeds = pConsole->i_getLedSet(iLedSet); 11947 11943 11948 rc = pHlp->pfnCFGMQueryBoolDef(pCfg, "HasMediumAttachments", &pThis->fHasMediumAttachments, false);11949 AssertLogRelMsgRCReturn( rc, ("Configuration error: Failed to query the \"HasMediumAttachments\" value! rc=%Rrc\n", rc),rc);11944 vrc = pHlp->pfnCFGMQueryBoolDef(pCfg, "HasMediumAttachments", &pThis->fHasMediumAttachments, false); 11945 AssertLogRelMsgRCReturn(vrc, ("Configuration error: Failed to query the \"HasMediumAttachments\" value! vrc=%Rrc\n", vrc), vrc); 11950 11946 11951 11947 if (pThis->fHasMediumAttachments) 11952 11948 { 11953 rc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "DeviceInstance", &pThis->pszDeviceInstance);11954 AssertLogRelMsgRCReturn( rc, ("Configuration error: Failed to query the \"DeviceInstance\" value! rc=%Rrc\n", rc),rc);11955 } 11956 11957 rc = pHlp->pfnCFGMQueryU32Def(pCfg, "First", &pThis->iFirstLUN, 0);11958 AssertLogRelMsgRCReturn( rc, ("Configuration error: Failed to query the \"First\" value! rc=%Rrc\n", rc),rc);11959 11960 rc = pHlp->pfnCFGMQueryU32Def(pCfg, "Last", &pThis->iLastLUN, 0);11961 AssertLogRelMsgRCReturn( rc, ("Configuration error: Failed to query the \"Last\" value! rc=%Rrc\n", rc),rc);11949 vrc = pHlp->pfnCFGMQueryStringAlloc(pCfg, "DeviceInstance", &pThis->pszDeviceInstance); 11950 AssertLogRelMsgRCReturn(vrc, ("Configuration error: Failed to query the \"DeviceInstance\" value! vrc=%Rrc\n", vrc), vrc); 11951 } 11952 11953 vrc = pHlp->pfnCFGMQueryU32Def(pCfg, "First", &pThis->iFirstLUN, 0); 11954 AssertLogRelMsgRCReturn(vrc, ("Configuration error: Failed to query the \"First\" value! vrc=%Rrc\n", vrc), vrc); 11955 11956 vrc = pHlp->pfnCFGMQueryU32Def(pCfg, "Last", &pThis->iLastLUN, 0); 11957 AssertLogRelMsgRCReturn(vrc, ("Configuration error: Failed to query the \"Last\" value! vrc=%Rrc\n", vrc), vrc); 11962 11958 11963 11959 AssertLogRelMsgReturn(pThis->iFirstLUN <= pThis->iLastLUN,
Note:
See TracChangeset
for help on using the changeset viewer.