Changeset 98265 in vbox
- Timestamp:
- Jan 24, 2023 9:26:46 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155468
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r98264 r98265 5334 5334 ::FireHostAudioDeviceChangedEvent(mEventSource, aDevice, aNew, aState, aErrInfo); 5335 5335 5336 LogFlowThisFunc(("Leaving rc=%#x\n", S_OK));5336 LogFlowThisFunc(("Leaving S_OK\n")); 5337 5337 return S_OK; 5338 5338 } … … 6827 6827 HRESULT Console::i_reconfigureMediumAttachments(const std::vector<ComPtr<IMediumAttachment> > &aAttachments) 6828 6828 { 6829 HRESULT rc = S_OK;6830 6829 6831 6830 AutoCaller autoCaller(this); 6832 if (FAILED(autoCaller.hrc())) return autoCaller.hrc(); 6831 if (FAILED(autoCaller.hrc())) 6832 return autoCaller.hrc(); 6833 6833 6834 6834 /* get the VM handle. */ … … 6839 6839 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 6840 6840 6841 HRESULT rc = S_OK; 6841 6842 for (size_t i = 0; i < aAttachments.size(); ++i) 6842 6843 { 6843 ComPtr<IStorageController> pStorageController;6844 Bstr controllerName;6845 ULONG lInstance;6846 StorageControllerType_T enmController;6847 StorageBus_T enmBus;6848 BOOL fUseHostIOCache;6849 6850 6844 /* 6851 6845 * We could pass the objects, but then EMT would have to do lots of … … 6853 6847 * Better query needed values here and pass them. 6854 6848 */ 6855 rc = aAttachments[i]->COMGETTER(Controller)(controllerName.asOutParam()); 6856 if (FAILED(rc)) 6857 throw rc; 6858 6859 rc = mMachine->GetStorageControllerByName(controllerName.raw(), pStorageController.asOutParam()); 6860 if (FAILED(rc)) 6861 throw rc; 6862 6863 rc = pStorageController->COMGETTER(ControllerType)(&enmController); 6864 if (FAILED(rc)) 6865 throw rc; 6866 rc = pStorageController->COMGETTER(Instance)(&lInstance); 6867 if (FAILED(rc)) 6868 throw rc; 6869 rc = pStorageController->COMGETTER(Bus)(&enmBus); 6870 if (FAILED(rc)) 6871 throw rc; 6872 rc = pStorageController->COMGETTER(UseHostIOCache)(&fUseHostIOCache); 6873 if (FAILED(rc)) 6874 throw rc; 6875 6876 const char *pcszDevice = i_storageControllerTypeToStr(enmController); 6849 Bstr controllerName; 6850 HRESULT hrc = aAttachments[i]->COMGETTER(Controller)(controllerName.asOutParam()); 6851 if (FAILED(hrc)) 6852 return hrc; 6853 6854 ComPtr<IStorageController> pStorageController; 6855 hrc = mMachine->GetStorageControllerByName(controllerName.raw(), pStorageController.asOutParam()); 6856 if (FAILED(hrc)) 6857 return hrc; 6858 6859 StorageControllerType_T enmController; 6860 hrc = pStorageController->COMGETTER(ControllerType)(&enmController); 6861 if (FAILED(hrc)) 6862 return hrc; 6863 const char * const pcszDevice = i_storageControllerTypeToStr(enmController); 6864 6865 ULONG lInstance; 6866 hrc = pStorageController->COMGETTER(Instance)(&lInstance); 6867 if (FAILED(hrc)) 6868 return hrc; 6869 6870 StorageBus_T enmBus; 6871 hrc = pStorageController->COMGETTER(Bus)(&enmBus); 6872 if (FAILED(hrc)) 6873 return hrc; 6874 6875 BOOL fUseHostIOCache; 6876 hrc = pStorageController->COMGETTER(UseHostIOCache)(&fUseHostIOCache); 6877 if (FAILED(hrc)) 6878 return hrc; 6877 6879 6878 6880 BOOL fBuiltinIOCache; 6879 6881 rc = mMachine->COMGETTER(IOCacheEnabled)(&fBuiltinIOCache); 6880 6882 if (FAILED(rc)) 6881 throwrc;6883 return hrc; 6882 6884 6883 6885 bool fInsertDiskIntegrityDrv = false; 6884 6886 Bstr strDiskIntegrityFlag; 6885 rc = mMachine->GetExtraData(Bstr("VBoxInternal2/EnableDiskIntegrityDriver").raw(),6886 strDiskIntegrityFlag.asOutParam());6887 if ( rc == S_OK6887 hrc = mMachine->GetExtraData(Bstr("VBoxInternal2/EnableDiskIntegrityDriver").raw(), 6888 strDiskIntegrityFlag.asOutParam()); 6889 if ( hrc == S_OK 6888 6890 && strDiskIntegrityFlag == "1") 6889 6891 fInsertDiskIntegrityDrv = true; … … 6891 6893 alock.release(); 6892 6894 6895 hrc = S_OK; 6893 6896 IMediumAttachment *pAttachment = aAttachments[i]; 6894 6897 int vrc = ptrVM.vtable()->pfnVMR3ReqCallWaitU(ptrVM.rawUVM(), VMCPUID_ANY, … … 6900 6903 if (RT_FAILURE(vrc)) 6901 6904 throw setErrorBoth(E_FAIL, vrc, "%Rrc", vrc); 6902 if (FAILED( rc))6903 throw rc;6905 if (FAILED(hrc)) 6906 throw hrc; 6904 6907 6905 6908 alock.acquire(); 6906 6909 } 6907 6910 6908 return rc;6911 return S_OK; 6909 6912 } 6910 6913
Note:
See TracChangeset
for help on using the changeset viewer.