Changeset 98291 in vbox for trunk/src/VBox/Main/src-server/MediumImpl.cpp
- Timestamp:
- Jan 25, 2023 12:16:44 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155496
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r98289 r98291 3922 3922 HRESULT Medium::reset(AutoCaller &autoCaller, ComPtr<IProgress> &aProgress) 3923 3923 { 3924 HRESULT rc = S_OK;3924 HRESULT hrc = S_OK; 3925 3925 ComObjPtr<Progress> pProgress; 3926 3926 Medium::Task *pTask = NULL; … … 3949 3949 m->strLocationFull.c_str()); 3950 3950 3951 rc = i_canClose();3952 if (FAILED( rc))3953 throw rc;3951 hrc = i_canClose(); 3952 if (FAILED(hrc)) 3953 throw hrc; 3954 3954 3955 3955 /* Build the medium lock list. */ 3956 3956 MediumLockList *pMediumLockList(new MediumLockList()); 3957 3957 multilock.release(); 3958 rc = i_createMediumLockList(true /* fFailIfInaccessible */,3959 this /* pToLockWrite */,3960 false /* fMediumLockWriteAll */,3961 NULL,3962 *pMediumLockList);3958 hrc = i_createMediumLockList(true /* fFailIfInaccessible */, 3959 this /* pToLockWrite */, 3960 false /* fMediumLockWriteAll */, 3961 NULL, 3962 *pMediumLockList); 3963 3963 multilock.acquire(); 3964 if (FAILED( rc))3964 if (FAILED(hrc)) 3965 3965 { 3966 3966 delete pMediumLockList; 3967 throw rc;3967 throw hrc; 3968 3968 } 3969 3969 3970 3970 multilock.release(); 3971 rc = pMediumLockList->Lock();3971 hrc = pMediumLockList->Lock(); 3972 3972 multilock.acquire(); 3973 if (FAILED( rc))3973 if (FAILED(hrc)) 3974 3974 { 3975 3975 delete pMediumLockList; 3976 throw setError( rc,3976 throw setError(hrc, 3977 3977 tr("Failed to lock media when resetting '%s'"), 3978 3978 i_getLocationFull().c_str()); … … 3980 3980 3981 3981 pProgress.createObject(); 3982 rc = pProgress->init(m->pVirtualBox,3983 static_cast<IMedium*>(this),3984 BstrFmt(tr("Resetting differencing medium '%s'"), m->strLocationFull.c_str()).raw(),3985 FALSE /* aCancelable */);3986 if (FAILED( rc))3987 throw rc;3982 hrc = pProgress->init(m->pVirtualBox, 3983 static_cast<IMedium*>(this), 3984 BstrFmt(tr("Resetting differencing medium '%s'"), m->strLocationFull.c_str()).raw(), 3985 FALSE /* aCancelable */); 3986 if (FAILED(hrc)) 3987 throw hrc; 3988 3988 3989 3989 /* setup task object to carry out the operation asynchronously */ 3990 3990 pTask = new Medium::ResetTask(this, pProgress, pMediumLockList); 3991 rc = pTask->hrc();3992 AssertComRC( rc);3993 if (FAILED( rc))3994 throw rc;3995 } 3996 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }3997 3998 if (SUCCEEDED( rc))3999 { 4000 rc = pTask->createThread();3991 hrc = pTask->hrc(); 3992 AssertComRC(hrc); 3993 if (FAILED(hrc)) 3994 throw hrc; 3995 } 3996 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 3997 3998 if (SUCCEEDED(hrc)) 3999 { 4000 hrc = pTask->createThread(); 4001 4001 pTask = NULL; 4002 if (SUCCEEDED( rc))4002 if (SUCCEEDED(hrc)) 4003 4003 pProgress.queryInterfaceTo(aProgress.asOutParam()); 4004 4004 } … … 4006 4006 delete pTask; 4007 4007 4008 LogFlowThisFunc(("LEAVE, rc=%Rhrc\n",rc));4009 4010 return rc;4008 LogFlowThisFunc(("LEAVE, hrc=%Rhrc\n", hrc)); 4009 4010 return hrc; 4011 4011 } 4012 4012 … … 4015 4015 ComPtr<IProgress> &aProgress) 4016 4016 { 4017 HRESULT rc = S_OK;4017 HRESULT hrc = S_OK; 4018 4018 ComObjPtr<Progress> pProgress; 4019 4019 Medium::Task *pTask = NULL; … … 4045 4045 MediumLockList *pMediumLockList(new MediumLockList()); 4046 4046 alock.release(); 4047 rc = i_createMediumLockList(true /* fFailIfInaccessible */ ,4048 this /* pToLockWrite */,4049 true /* fMediumLockAllWrite */,4050 NULL,4051 *pMediumLockList);4047 hrc = i_createMediumLockList(true /* fFailIfInaccessible */ , 4048 this /* pToLockWrite */, 4049 true /* fMediumLockAllWrite */, 4050 NULL, 4051 *pMediumLockList); 4052 4052 alock.acquire(); 4053 if (FAILED( rc))4053 if (FAILED(hrc)) 4054 4054 { 4055 4055 delete pMediumLockList; 4056 throw rc;4056 throw hrc; 4057 4057 } 4058 4058 4059 4059 alock.release(); 4060 rc = pMediumLockList->Lock();4060 hrc = pMediumLockList->Lock(); 4061 4061 alock.acquire(); 4062 if (FAILED( rc))4062 if (FAILED(hrc)) 4063 4063 { 4064 4064 delete pMediumLockList; 4065 throw setError( rc,4065 throw setError(hrc, 4066 4066 tr("Failed to lock media for encryption '%s'"), 4067 4067 i_getLocationFull().c_str()); … … 4086 4086 if (pMedium->m->backRefs.size() > 1) 4087 4087 { 4088 rc = setError(VBOX_E_INVALID_OBJECT_STATE,4089 tr("Cannot encrypt medium '%s' because it is attached to %d virtual machines", "",4090 pMedium->m->backRefs.size()),4091 pMedium->m->strLocationFull.c_str(), pMedium->m->backRefs.size());4088 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 4089 tr("Cannot encrypt medium '%s' because it is attached to %d virtual machines", "", 4090 pMedium->m->backRefs.size()), 4091 pMedium->m->strLocationFull.c_str(), pMedium->m->backRefs.size()); 4092 4092 break; 4093 4093 } 4094 4094 else if (pMedium->i_getChildren().size() > 1) 4095 4095 { 4096 rc = setError(VBOX_E_INVALID_OBJECT_STATE,4097 tr("Cannot encrypt medium '%s' because it has %d children", "", pMedium->i_getChildren().size()),4098 pMedium->m->strLocationFull.c_str(), pMedium->i_getChildren().size());4096 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 4097 tr("Cannot encrypt medium '%s' because it has %d children", "", pMedium->i_getChildren().size()), 4098 pMedium->m->strLocationFull.c_str(), pMedium->i_getChildren().size()); 4099 4099 break; 4100 4100 } 4101 4101 } 4102 4102 4103 if (FAILED( rc))4103 if (FAILED(hrc)) 4104 4104 { 4105 4105 delete pMediumLockList; 4106 throw rc;4106 throw hrc; 4107 4107 } 4108 4108 … … 4113 4113 4114 4114 pProgress.createObject(); 4115 rc = pProgress->init(m->pVirtualBox,4116 static_cast <IMedium *>(this),4117 BstrFmt("%s '%s'", pszAction, m->strLocationFull.c_str()).raw(),4118 TRUE /* aCancelable */);4119 if (FAILED( rc))4115 hrc = pProgress->init(m->pVirtualBox, 4116 static_cast <IMedium *>(this), 4117 BstrFmt("%s '%s'", pszAction, m->strLocationFull.c_str()).raw(), 4118 TRUE /* aCancelable */); 4119 if (FAILED(hrc)) 4120 4120 { 4121 4121 delete pMediumLockList; 4122 throw rc;4122 throw hrc; 4123 4123 } 4124 4124 … … 4126 4126 pTask = new Medium::EncryptTask(this, aNewPassword, aCurrentPassword, 4127 4127 aCipher, aNewPasswordId, pProgress, pMediumLockList); 4128 rc = pTask->hrc();4129 AssertComRC( rc);4130 if (FAILED( rc))4131 throw rc;4132 } 4133 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }4134 4135 if (SUCCEEDED( rc))4136 { 4137 rc = pTask->createThread();4128 hrc = pTask->hrc(); 4129 AssertComRC(hrc); 4130 if (FAILED(hrc)) 4131 throw hrc; 4132 } 4133 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 4134 4135 if (SUCCEEDED(hrc)) 4136 { 4137 hrc = pTask->createThread(); 4138 4138 pTask = NULL; 4139 if (SUCCEEDED( rc))4139 if (SUCCEEDED(hrc)) 4140 4140 pProgress.queryInterfaceTo(aProgress.asOutParam()); 4141 4141 } … … 4143 4143 delete pTask; 4144 4144 4145 return rc;4145 return hrc; 4146 4146 } 4147 4147 … … 4151 4151 RT_NOREF(aCipher, aPasswordId); 4152 4152 #endif 4153 HRESULT rc = S_OK;4153 HRESULT hrc = S_OK; 4154 4154 4155 4155 try … … 4159 4159 autoCaller.add(); 4160 4160 if (FAILED(autoCaller.hrc())) 4161 throw rc;4161 throw hrc; 4162 4162 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 4163 4163 … … 4173 4173 /* Load the plugin */ 4174 4174 Utf8Str strPlugin; 4175 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);4176 if (SUCCEEDED( rc))4175 hrc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 4176 if (SUCCEEDED(hrc)) 4177 4177 { 4178 4178 int vrc = VDPluginLoadFromFilename(strPlugin.c_str()); … … 4220 4220 # endif 4221 4221 } 4222 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }4223 4224 return rc;4222 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 4223 4224 return hrc; 4225 4225 } 4226 4226 4227 4227 HRESULT Medium::checkEncryptionPassword(const com::Utf8Str &aPassword) 4228 4228 { 4229 HRESULT rc = S_OK;4229 HRESULT hrc = S_OK; 4230 4230 4231 4231 try … … 4249 4249 /* Load the plugin */ 4250 4250 Utf8Str strPlugin; 4251 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);4252 if (SUCCEEDED( rc))4251 hrc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 4252 if (SUCCEEDED(hrc)) 4253 4253 { 4254 4254 int vrc = VDPluginLoadFromFilename(strPlugin.c_str()); … … 4291 4291 # endif 4292 4292 } 4293 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }4294 4295 return rc;4293 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 4294 4295 return hrc; 4296 4296 } 4297 4297 … … 5233 5233 /* Encrypt the plain secret. If that does not work (i.e. no or wrong settings key 5234 5234 * specified), just use the encrypted secret (if there is any). */ 5235 int rc = m->pVirtualBox->i_encryptSetting(itPln->second, &strCiphertext);5236 if (RT_SUCCESS( rc))5235 int hrc = m->pVirtualBox->i_encryptSetting(itPln->second, &strCiphertext); 5236 if (RT_SUCCESS(hrc)) 5237 5237 fHaveInitiatorSecretEncrypted = true; 5238 5238 } … … 5350 5350 if (FAILED(autoCaller.hrc())) return autoCaller.hrc(); 5351 5351 5352 HRESULT rc = S_OK;5352 HRESULT hrc = S_OK; 5353 5353 5354 5354 /* paranoid sanity checking if the medium has a to-be parent medium */ … … 5375 5375 { 5376 5376 alock.release(); 5377 rc = pMedium->i_queryInfo(false /* fSetImageId */, false /* fSetParentId */, 5378 autoCaller); 5377 hrc = pMedium->i_queryInfo(false /* fSetImageId */, false /* fSetParentId */, autoCaller); 5379 5378 alock.acquire(); 5380 if (FAILED( rc)) returnrc;5379 if (FAILED(hrc)) return hrc; 5381 5380 5382 5381 mediumState = pMedium->i_getState(); … … 5390 5389 // otherwise report an error 5391 5390 Bstr error; 5392 rc = pMedium->COMGETTER(LastAccessError)(error.asOutParam());5393 if (FAILED( rc)) returnrc;5391 hrc = pMedium->COMGETTER(LastAccessError)(error.asOutParam()); 5392 if (FAILED(hrc)) return hrc; 5394 5393 5395 5394 /* collect multiple errors */ … … 5469 5468 if (FAILED(targetCaller.hrc())) return targetCaller.hrc(); 5470 5469 5471 HRESULT rc = S_OK;5470 HRESULT hrc = S_OK; 5472 5471 ComObjPtr<Progress> pProgress; 5473 5472 Medium::Task *pTask = NULL; … … 5519 5518 { 5520 5519 pProgress.createObject(); 5521 rc = pProgress->init(m->pVirtualBox,5522 static_cast<IMedium*>(this),5523 BstrFmt(tr("Creating differencing medium storage unit '%s'"),5524 aTarget->m->strLocationFull.c_str()).raw(),5525 TRUE /* aCancelable */);5526 if (FAILED( rc))5527 throw rc;5520 hrc = pProgress->init(m->pVirtualBox, 5521 static_cast<IMedium*>(this), 5522 BstrFmt(tr("Creating differencing medium storage unit '%s'"), 5523 aTarget->m->strLocationFull.c_str()).raw(), 5524 TRUE /* aCancelable */); 5525 if (FAILED(hrc)) 5526 throw hrc; 5528 5527 } 5529 5528 } … … 5534 5533 aWait /* fKeepMediumLockList */, 5535 5534 aNotify); 5536 rc = pTask->hrc();5537 AssertComRC( rc);5538 if (FAILED( rc))5539 throw rc;5535 hrc = pTask->hrc(); 5536 AssertComRC(hrc); 5537 if (FAILED(hrc)) 5538 throw hrc; 5540 5539 5541 5540 /* register a task (it will deregister itself when done) */ … … 5545 5544 aTarget->m->state = MediumState_Creating; 5546 5545 } 5547 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }5548 5549 if (SUCCEEDED( rc))5546 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 5547 5548 if (SUCCEEDED(hrc)) 5550 5549 { 5551 5550 if (aWait) 5552 5551 { 5553 rc = pTask->runNow();5552 hrc = pTask->runNow(); 5554 5553 delete pTask; 5555 5554 } 5556 5555 else 5557 rc = pTask->createThread();5556 hrc = pTask->createThread(); 5558 5557 pTask = NULL; 5559 if (SUCCEEDED( rc) && aProgress != NULL)5558 if (SUCCEEDED(hrc) && aProgress != NULL) 5560 5559 *aProgress = pProgress; 5561 5560 } … … 5563 5562 delete pTask; 5564 5563 5565 return rc;5564 return hrc; 5566 5565 } 5567 5566 … … 5673 5672 5674 5673 // perform extra media-dependent close checks 5675 HRESULT rc = i_canClose();5676 if (FAILED( rc)) returnrc;5674 HRESULT hrc = i_canClose(); 5675 if (FAILED(hrc)) return hrc; 5677 5676 5678 5677 m->fClosing = true; … … 5683 5682 // uninitialization (to keep the media registry consistent on 5684 5683 // failure to do so) 5685 rc = i_unregisterWithVirtualBox();5686 if (FAILED( rc)) returnrc;5684 hrc = i_unregisterWithVirtualBox(); 5685 if (FAILED(hrc)) return hrc; 5687 5686 5688 5687 multilock.release(); … … 5710 5709 LogFlowFuncLeave(); 5711 5710 5712 return rc;5711 return hrc; 5713 5712 } 5714 5713 … … 5742 5741 AssertReturn(aProgress != NULL || aWait == true, E_FAIL); 5743 5742 5744 HRESULT rc = S_OK;5743 HRESULT hrc = S_OK; 5745 5744 ComObjPtr<Progress> pProgress; 5746 5745 Medium::Task *pTask = NULL; … … 5827 5826 } 5828 5827 5829 rc = i_canClose();5830 if (FAILED( rc))5831 throw rc;5828 hrc = i_canClose(); 5829 if (FAILED(hrc)) 5830 throw hrc; 5832 5831 5833 5832 /* go to Deleting state, so that the medium is not actually locked */ 5834 5833 if (m->state != MediumState_Deleting) 5835 5834 { 5836 rc = i_markForDeletion();5837 if (FAILED( rc))5838 throw rc;5835 hrc = i_markForDeletion(); 5836 if (FAILED(hrc)) 5837 throw hrc; 5839 5838 } 5840 5839 … … 5844 5843 autoCaller.release(); 5845 5844 treelock.release(); 5846 rc = i_createMediumLockList(true /* fFailIfInaccessible */,5847 this /* pToLockWrite */,5848 false /* fMediumLockWriteAll */,5849 NULL,5850 *pMediumLockList);5845 hrc = i_createMediumLockList(true /* fFailIfInaccessible */, 5846 this /* pToLockWrite */, 5847 false /* fMediumLockWriteAll */, 5848 NULL, 5849 *pMediumLockList); 5851 5850 treelock.acquire(); 5852 5851 autoCaller.add(); 5853 5852 AssertComRCThrowRC(autoCaller.hrc()); 5854 5853 alock.acquire(); 5855 if (FAILED( rc))5854 if (FAILED(hrc)) 5856 5855 { 5857 5856 delete pMediumLockList; 5858 throw rc;5857 throw hrc; 5859 5858 } 5860 5859 … … 5862 5861 autoCaller.release(); 5863 5862 treelock.release(); 5864 rc = pMediumLockList->Lock();5863 hrc = pMediumLockList->Lock(); 5865 5864 treelock.acquire(); 5866 5865 autoCaller.add(); 5867 5866 AssertComRCThrowRC(autoCaller.hrc()); 5868 5867 alock.acquire(); 5869 if (FAILED( rc))5868 if (FAILED(hrc)) 5870 5869 { 5871 5870 delete pMediumLockList; 5872 throw setError( rc,5871 throw setError(hrc, 5873 5872 tr("Failed to lock media when deleting '%s'"), 5874 5873 i_getLocationFull().c_str()); … … 5879 5878 * which would have been broken if unregisterWithVirtualBox() failed 5880 5879 * after we successfully deleted the storage) */ 5881 rc = i_unregisterWithVirtualBox();5882 if (FAILED( rc))5883 throw rc;5880 hrc = i_unregisterWithVirtualBox(); 5881 if (FAILED(hrc)) 5882 throw hrc; 5884 5883 // no longer need lock 5885 5884 alock.release(); … … 5897 5896 { 5898 5897 pProgress.createObject(); 5899 rc = pProgress->init(m->pVirtualBox,5900 static_cast<IMedium*>(this),5901 BstrFmt(tr("Deleting medium storage unit '%s'"), m->strLocationFull.c_str()).raw(),5902 FALSE /* aCancelable */);5903 if (FAILED( rc))5904 throw rc;5898 hrc = pProgress->init(m->pVirtualBox, 5899 static_cast<IMedium*>(this), 5900 BstrFmt(tr("Deleting medium storage unit '%s'"), m->strLocationFull.c_str()).raw(), 5901 FALSE /* aCancelable */); 5902 if (FAILED(hrc)) 5903 throw hrc; 5905 5904 } 5906 5905 } … … 5908 5907 /* setup task object to carry out the operation sync/async */ 5909 5908 pTask = new Medium::DeleteTask(this, pProgress, pMediumLockList, false, aNotify); 5910 rc = pTask->hrc();5911 AssertComRC( rc);5912 if (FAILED( rc))5913 throw rc;5914 } 5915 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }5916 5917 if (SUCCEEDED( rc))5909 hrc = pTask->hrc(); 5910 AssertComRC(hrc); 5911 if (FAILED(hrc)) 5912 throw hrc; 5913 } 5914 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 5915 5916 if (SUCCEEDED(hrc)) 5918 5917 { 5919 5918 if (aWait) 5920 5919 { 5921 rc = pTask->runNow();5920 hrc = pTask->runNow(); 5922 5921 delete pTask; 5923 5922 } 5924 5923 else 5925 rc = pTask->createThread();5924 hrc = pTask->createThread(); 5926 5925 pTask = NULL; 5927 if (SUCCEEDED( rc) && aProgress != NULL)5926 if (SUCCEEDED(hrc) && aProgress != NULL) 5928 5927 *aProgress = pProgress; 5929 5928 } … … 5943 5942 } 5944 5943 5945 return rc;5944 return hrc; 5946 5945 } 5947 5946 … … 6043 6042 AssertReturn(pOther != this, E_FAIL); 6044 6043 6045 HRESULT rc = S_OK;6044 HRESULT hrc = S_OK; 6046 6045 bool fThisParent = false; /**<< Flag whether this medium is the parent of pOther. */ 6047 6046 … … 6107 6106 6108 6107 if (RT_FAILURE(vrc)) 6109 rc = E_FAIL;6108 hrc = E_FAIL; 6110 6109 else 6111 6110 { … … 6122 6121 uint32_t mediumCaps = MediumFormatCapabilities_CreateDynamic | MediumFormatCapabilities_File; 6123 6122 6124 bool fDynamicOther =pOther->i_getMediumFormat()->i_getCapabilities() & mediumCaps6125 6126 bool fDynamicThis =i_getMediumFormat()->i_getCapabilities() & mediumCaps6127 6128 bool fMergeIntoThis = 6129 6123 bool fDynamicOther = pOther->i_getMediumFormat()->i_getCapabilities() & mediumCaps 6124 && pOther->i_getVariant() & ~mediumVariants; 6125 bool fDynamicThis = i_getMediumFormat()->i_getCapabilities() & mediumCaps 6126 && i_getVariant() & ~mediumVariants; 6127 bool fMergeIntoThis = (fDynamicThis && !fDynamicOther) 6128 || (fDynamicThis == fDynamicOther && cbMediumThis > cbMediumOther); 6130 6129 fMergeForward = fMergeIntoThis != fThisParent; 6131 6130 } 6132 6131 } 6133 6132 } 6134 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }6135 6136 return rc;6133 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 6134 6135 return hrc; 6137 6136 } 6138 6137 … … 6177 6176 AssertReturn(pTarget != this, E_FAIL); 6178 6177 6179 HRESULT rc = S_OK;6178 HRESULT hrc = S_OK; 6180 6179 fMergeForward = false; 6181 6180 pParentForTarget.setNull(); … … 6230 6229 treeLock.release(); 6231 6230 if (fMergeForward) 6232 rc = pTarget->i_createMediumLockList(true /* fFailIfInaccessible */,6233 pTarget /* pToLockWrite */,6234 false /* fMediumLockWriteAll */,6235 NULL,6236 *aMediumLockList);6231 hrc = pTarget->i_createMediumLockList(true /* fFailIfInaccessible */, 6232 pTarget /* pToLockWrite */, 6233 false /* fMediumLockWriteAll */, 6234 NULL, 6235 *aMediumLockList); 6237 6236 else 6238 rc = i_createMediumLockList(true /* fFailIfInaccessible */,6239 pTarget /* pToLockWrite */,6240 false /* fMediumLockWriteAll */,6241 NULL,6242 *aMediumLockList);6237 hrc = i_createMediumLockList(true /* fFailIfInaccessible */, 6238 pTarget /* pToLockWrite */, 6239 false /* fMediumLockWriteAll */, 6240 NULL, 6241 *aMediumLockList); 6243 6242 treeLock.acquire(); 6244 6243 autoCaller.add(); … … 6246 6245 targetCaller.add(); 6247 6246 AssertComRCThrowRC(targetCaller.hrc()); 6248 if (FAILED( rc))6249 throw rc;6247 if (FAILED(hrc)) 6248 throw hrc; 6250 6249 6251 6250 /* Sanity checking, must be after lock list creation as it depends on … … 6347 6346 if (m->state == MediumState_Created) 6348 6347 { 6349 rc = i_markForDeletion();6350 if (FAILED( rc))6351 throw rc;6348 hrc = i_markForDeletion(); 6349 if (FAILED(hrc)) 6350 throw hrc; 6352 6351 } 6353 6352 else … … 6391 6390 autoCaller.release(); 6392 6391 treeLock.release(); 6393 rc = aChildrenToReparent->Lock();6392 hrc = aChildrenToReparent->Lock(); 6394 6393 treeLock.acquire(); 6395 6394 autoCaller.add(); … … 6397 6396 targetCaller.add(); 6398 6397 AssertComRCThrowRC(targetCaller.hrc()); 6399 if (FAILED( rc))6400 throw rc;6398 if (FAILED(hrc)) 6399 throw hrc; 6401 6400 } 6402 6401 } … … 6408 6407 if (pLast->m->state == MediumState_Created) 6409 6408 { 6410 rc = pLast->i_markForDeletion();6411 if (FAILED( rc))6412 throw rc;6409 hrc = pLast->i_markForDeletion(); 6410 if (FAILED(hrc)) 6411 throw hrc; 6413 6412 } 6414 6413 else … … 6432 6431 if (mediumLock.GetMedium() == pTarget) 6433 6432 { 6434 HRESULT rc2 = mediumLock.UpdateLock(true);6435 AssertComRC( rc2);6433 HRESULT hrc2 = mediumLock.UpdateLock(true); 6434 AssertComRC(hrc2); 6436 6435 break; 6437 6436 } … … 6444 6443 autoCaller.release(); 6445 6444 treeLock.release(); 6446 rc = aMediumLockList->Lock();6445 hrc = aMediumLockList->Lock(); 6447 6446 treeLock.acquire(); 6448 6447 autoCaller.add(); … … 6450 6449 targetCaller.add(); 6451 6450 AssertComRCThrowRC(targetCaller.hrc()); 6452 if (FAILED( rc))6451 if (FAILED(hrc)) 6453 6452 { 6454 6453 AutoReadLock alock(pTarget COMMA_LOCKVAL_SRC_POS); 6455 throw setError( rc,6454 throw setError(hrc, 6456 6455 tr("Failed to lock media when merging to '%s'"), 6457 6456 pTarget->i_getLocationFull().c_str()); … … 6459 6458 } 6460 6459 } 6461 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }6462 6463 if (FAILED( rc))6460 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 6461 6462 if (FAILED(hrc)) 6464 6463 { 6465 6464 if (aMediumLockList) … … 6475 6474 } 6476 6475 6477 return rc;6476 return hrc; 6478 6477 } 6479 6478 … … 6575 6574 AssertComRCReturnRC(targetCaller.hrc()); 6576 6575 6577 HRESULT rc = S_OK;6576 HRESULT hrc = S_OK; 6578 6577 ComObjPtr<Progress> pProgress; 6579 6578 Medium::Task *pTask = NULL; … … 6598 6597 6599 6598 pProgress.createObject(); 6600 rc = pProgress->init(m->pVirtualBox,6601 static_cast<IMedium*>(this),6602 BstrFmt(tr("Merging medium '%s' to '%s'"),6603 i_getName().c_str(),6604 tgtName.c_str()).raw(),6605 TRUE, /* aCancelable */6606 2, /* Number of opearations */6607 BstrFmt(tr("Resizing medium '%s' before merge"),6608 tgtName.c_str()).raw()6609 );6610 if (FAILED( rc))6611 throw rc;6599 hrc = pProgress->init(m->pVirtualBox, 6600 static_cast<IMedium*>(this), 6601 BstrFmt(tr("Merging medium '%s' to '%s'"), 6602 i_getName().c_str(), 6603 tgtName.c_str()).raw(), 6604 TRUE, /* aCancelable */ 6605 2, /* Number of opearations */ 6606 BstrFmt(tr("Resizing medium '%s' before merge"), 6607 tgtName.c_str()).raw() 6608 ); 6609 if (FAILED(hrc)) 6610 throw hrc; 6612 6611 } 6613 6612 } … … 6619 6618 aWait /* fKeepMediumLockList */, 6620 6619 aNotify); 6621 rc = pTask->hrc();6622 AssertComRC( rc);6623 if (FAILED( rc))6624 throw rc;6625 } 6626 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }6627 6628 if (SUCCEEDED( rc))6620 hrc = pTask->hrc(); 6621 AssertComRC(hrc); 6622 if (FAILED(hrc)) 6623 throw hrc; 6624 } 6625 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 6626 6627 if (SUCCEEDED(hrc)) 6629 6628 { 6630 6629 if (aWait) 6631 6630 { 6632 rc = pTask->runNow();6631 hrc = pTask->runNow(); 6633 6632 delete pTask; 6634 6633 } 6635 6634 else 6636 rc = pTask->createThread();6635 hrc = pTask->createThread(); 6637 6636 pTask = NULL; 6638 if (SUCCEEDED( rc) && aProgress != NULL)6637 if (SUCCEEDED(hrc) && aProgress != NULL) 6639 6638 *aProgress = pProgress; 6640 6639 } … … 6642 6641 delete pTask; 6643 6642 6644 return rc;6643 return hrc; 6645 6644 } 6646 6645 … … 6666 6665 6667 6666 /* Revert media marked for deletion to previous state. */ 6668 HRESULT rc;6669 6667 MediumLockList::Base::const_iterator mediumListBegin = 6670 6668 aMediumLockList->GetBegin(); … … 6681 6679 if (pMedium->m->state == MediumState_Deleting) 6682 6680 { 6683 rc = pMedium->i_unmarkForDeletion();6684 AssertComRC( rc);6681 HRESULT hrc = pMedium->i_unmarkForDeletion(); 6682 AssertComRC(hrc); 6685 6683 } 6686 6684 else if ( ( pMedium->m->state == MediumState_LockedWrite … … 6688 6686 && pMedium->m->preLockState == MediumState_Deleting) 6689 6687 { 6690 rc = pMedium->i_unmarkLockedForDeletion();6691 AssertComRC( rc);6688 HRESULT hrc = pMedium->i_unmarkLockedForDeletion(); 6689 AssertComRC(hrc); 6692 6690 } 6693 6691 } … … 6750 6748 AssertComRCReturnRC(autoCaller.hrc()); 6751 6749 6752 HRESULT rc = S_OK;6750 HRESULT hrc = S_OK; 6753 6751 ComObjPtr<Progress> pProgress; 6754 6752 Medium::Task *pTask = NULL; … … 6767 6765 6768 6766 pProgress.createObject(); 6769 rc = pProgress->init(m->pVirtualBox,6770 static_cast <IMedium *>(this),6771 BstrFmt(tr("Resizing medium '%s'"), m->strLocationFull.c_str()).raw(),6772 TRUE /* aCancelable */);6773 if (FAILED( rc))6774 throw rc;6767 hrc = pProgress->init(m->pVirtualBox, 6768 static_cast <IMedium *>(this), 6769 BstrFmt(tr("Resizing medium '%s'"), m->strLocationFull.c_str()).raw(), 6770 TRUE /* aCancelable */); 6771 if (FAILED(hrc)) 6772 throw hrc; 6775 6773 } 6776 6774 } … … 6783 6781 aWait /* fKeepMediumLockList */, 6784 6782 aNotify); 6785 rc = pTask->hrc();6786 AssertComRC( rc);6787 if (FAILED( rc))6788 throw rc;6789 } 6790 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }6791 6792 if (SUCCEEDED( rc))6783 hrc = pTask->hrc(); 6784 AssertComRC(hrc); 6785 if (FAILED(hrc)) 6786 throw hrc; 6787 } 6788 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 6789 6790 if (SUCCEEDED(hrc)) 6793 6791 { 6794 6792 if (aWait) 6795 6793 { 6796 rc = pTask->runNow();6794 hrc = pTask->runNow(); 6797 6795 delete pTask; 6798 6796 } 6799 6797 else 6800 rc = pTask->createThread();6798 hrc = pTask->createThread(); 6801 6799 pTask = NULL; 6802 if (SUCCEEDED( rc) && aProgress != NULL)6800 if (SUCCEEDED(hrc) && aProgress != NULL) 6803 6801 *aProgress = pProgress; 6804 6802 } … … 6806 6804 delete pTask; 6807 6805 6808 return rc;6806 return hrc; 6809 6807 } 6810 6808 … … 6822 6820 Assert(!m->pVirtualBox->i_getMediaTreeLockHandle().isWriteLockOnCurrentThread()); 6823 6821 MediumLockList mediumLockList; 6824 HRESULT rc = i_createMediumLockList(true /* fFailIfInaccessible */,6825 NULL /* pToLockWrite */,6826 false /* fMediumLockWriteAll */,6827 this,6828 mediumLockList);6829 AssertComRCReturnRC( rc);6822 HRESULT hrc = i_createMediumLockList(true /* fFailIfInaccessible */, 6823 NULL /* pToLockWrite */, 6824 false /* fMediumLockWriteAll */, 6825 this, 6826 mediumLockList); 6827 AssertComRCReturnRC(hrc); 6830 6828 6831 6829 try … … 6884 6882 } 6885 6883 } 6886 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }6887 catch (int aVRC)6888 { 6889 rc = setErrorBoth(E_FAIL, aVRC,6890 tr("Could not update medium UUID references to parent '%s' (%s)"),6891 m->strLocationFull.c_str(),6892 i_vdError(aVRC).c_str());6884 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 6885 catch (int vrcXcpt) 6886 { 6887 hrc = setErrorBoth(E_FAIL, vrcXcpt, 6888 tr("Could not update medium UUID references to parent '%s' (%s)"), 6889 m->strLocationFull.c_str(), 6890 i_vdError(vrcXcpt).c_str()); 6893 6891 } 6894 6892 6895 6893 VDDestroy(hdd); 6896 6894 } 6897 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }6898 6899 return rc;6895 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 6896 6897 return hrc; 6900 6898 } 6901 6899 … … 7113 7111 if (FAILED(autoCaller.hrc())) return autoCaller.hrc(); 7114 7112 7115 HRESULT rc = S_OK;7113 HRESULT hrc = S_OK; 7116 7114 Medium::Task *pTask = NULL; 7117 7115 … … 7137 7135 MediumLockList *pTargetMediumLockList(new MediumLockList()); 7138 7136 alock.release(); 7139 rc = i_createMediumLockList(true /* fFailIfInaccessible */,7140 this /* pToLockWrite */,7141 false /* fMediumLockWriteAll */,7142 aParent,7143 *pTargetMediumLockList);7137 hrc = i_createMediumLockList(true /* fFailIfInaccessible */, 7138 this /* pToLockWrite */, 7139 false /* fMediumLockWriteAll */, 7140 aParent, 7141 *pTargetMediumLockList); 7144 7142 alock.acquire(); 7145 if (FAILED( rc))7143 if (FAILED(hrc)) 7146 7144 { 7147 7145 delete pTargetMediumLockList; 7148 throw rc;7146 throw hrc; 7149 7147 } 7150 7148 7151 7149 alock.release(); 7152 rc = pTargetMediumLockList->Lock();7150 hrc = pTargetMediumLockList->Lock(); 7153 7151 alock.acquire(); 7154 if (FAILED( rc))7152 if (FAILED(hrc)) 7155 7153 { 7156 7154 delete pTargetMediumLockList; 7157 throw setError( rc,7155 throw setError(hrc, 7158 7156 tr("Failed to lock target media '%s'"), 7159 7157 i_getLocationFull().c_str()); … … 7163 7161 pTask = new Medium::ImportTask(this, aProgress, aFilename, aFormat, aVariant, 7164 7162 aVfsIosSrc, aParent, pTargetMediumLockList, false, aNotify); 7165 rc = pTask->hrc();7166 AssertComRC( rc);7167 if (FAILED( rc))7168 throw rc;7163 hrc = pTask->hrc(); 7164 AssertComRC(hrc); 7165 if (FAILED(hrc)) 7166 throw hrc; 7169 7167 7170 7168 if (m->state == MediumState_NotCreated) 7171 7169 m->state = MediumState_Creating; 7172 7170 } 7173 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }7174 7175 if (SUCCEEDED( rc))7176 { 7177 rc = pTask->createThread();7171 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 7172 7173 if (SUCCEEDED(hrc)) 7174 { 7175 hrc = pTask->createThread(); 7178 7176 pTask = NULL; 7179 7177 } … … 7181 7179 delete pTask; 7182 7180 7183 return rc;7181 return hrc; 7184 7182 } 7185 7183 … … 7217 7215 if (FAILED(autoCaller.hrc())) return autoCaller.hrc(); 7218 7216 7219 HRESULT rc = S_OK;7217 HRESULT hrc = S_OK; 7220 7218 ComObjPtr<Progress> pProgress; 7221 7219 Medium::Task *pTask = NULL; … … 7243 7241 MediumLockList *pSourceMediumLockList(new MediumLockList()); 7244 7242 alock.release(); 7245 rc = i_createMediumLockList(true /* fFailIfInaccessible */,7243 hrc = i_createMediumLockList(true /* fFailIfInaccessible */, 7246 7244 NULL /* pToLockWrite */, 7247 7245 false /* fMediumLockWriteAll */, … … 7249 7247 *pSourceMediumLockList); 7250 7248 alock.acquire(); 7251 if (FAILED( rc))7249 if (FAILED(hrc)) 7252 7250 { 7253 7251 delete pSourceMediumLockList; 7254 throw rc;7252 throw hrc; 7255 7253 } 7256 7254 … … 7258 7256 MediumLockList *pTargetMediumLockList(new MediumLockList()); 7259 7257 alock.release(); 7260 rc = aTarget->i_createMediumLockList(true /* fFailIfInaccessible */,7261 aTarget /* pToLockWrite */,7262 false /* fMediumLockWriteAll */,7263 aParent,7264 *pTargetMediumLockList);7258 hrc = aTarget->i_createMediumLockList(true /* fFailIfInaccessible */, 7259 aTarget /* pToLockWrite */, 7260 false /* fMediumLockWriteAll */, 7261 aParent, 7262 *pTargetMediumLockList); 7265 7263 alock.acquire(); 7266 if (FAILED( rc))7264 if (FAILED(hrc)) 7267 7265 { 7268 7266 delete pSourceMediumLockList; 7269 7267 delete pTargetMediumLockList; 7270 throw rc;7268 throw hrc; 7271 7269 } 7272 7270 7273 7271 alock.release(); 7274 rc = pSourceMediumLockList->Lock();7272 hrc = pSourceMediumLockList->Lock(); 7275 7273 alock.acquire(); 7276 if (FAILED( rc))7274 if (FAILED(hrc)) 7277 7275 { 7278 7276 delete pSourceMediumLockList; 7279 7277 delete pTargetMediumLockList; 7280 throw setError( rc,7278 throw setError(hrc, 7281 7279 tr("Failed to lock source media '%s'"), 7282 7280 i_getLocationFull().c_str()); 7283 7281 } 7284 7282 alock.release(); 7285 rc = pTargetMediumLockList->Lock();7283 hrc = pTargetMediumLockList->Lock(); 7286 7284 alock.acquire(); 7287 if (FAILED( rc))7285 if (FAILED(hrc)) 7288 7286 { 7289 7287 delete pSourceMediumLockList; 7290 7288 delete pTargetMediumLockList; 7291 throw setError( rc,7289 throw setError(hrc, 7292 7290 tr("Failed to lock target media '%s'"), 7293 7291 aTarget->i_getLocationFull().c_str()); … … 7295 7293 7296 7294 pProgress.createObject(); 7297 rc = pProgress->init(m->pVirtualBox,7298 static_cast <IMedium *>(this),7299 BstrFmt(tr("Creating clone medium '%s'"), aTarget->m->strLocationFull.c_str()).raw(),7300 TRUE /* aCancelable */);7301 if (FAILED( rc))7295 hrc = pProgress->init(m->pVirtualBox, 7296 static_cast <IMedium *>(this), 7297 BstrFmt(tr("Creating clone medium '%s'"), aTarget->m->strLocationFull.c_str()).raw(), 7298 TRUE /* aCancelable */); 7299 if (FAILED(hrc)) 7302 7300 { 7303 7301 delete pSourceMediumLockList; 7304 7302 delete pTargetMediumLockList; 7305 throw rc;7303 throw hrc; 7306 7304 } 7307 7305 … … 7311 7309 idxDstImageSame, pSourceMediumLockList, 7312 7310 pTargetMediumLockList, false, false, aNotify); 7313 rc = pTask->hrc();7314 AssertComRC( rc);7315 if (FAILED( rc))7316 throw rc;7311 hrc = pTask->hrc(); 7312 AssertComRC(hrc); 7313 if (FAILED(hrc)) 7314 throw hrc; 7317 7315 7318 7316 if (aTarget->m->state == MediumState_NotCreated) 7319 7317 aTarget->m->state = MediumState_Creating; 7320 7318 } 7321 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }7322 7323 if (SUCCEEDED( rc))7324 { 7325 rc = pTask->createThread();7319 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 7320 7321 if (SUCCEEDED(hrc)) 7322 { 7323 hrc = pTask->createThread(); 7326 7324 pTask = NULL; 7327 if (SUCCEEDED( rc))7325 if (SUCCEEDED(hrc)) 7328 7326 pProgress.queryInterfaceTo(aProgress); 7329 7327 } … … 7331 7329 delete pTask; 7332 7330 7333 return rc;7331 return hrc; 7334 7332 } 7335 7333 … … 7398 7396 HRESULT Medium::i_preparationForMoving(const Utf8Str &aLocation) 7399 7397 { 7400 HRESULT rc = E_FAIL;7398 HRESULT hrc = E_FAIL; 7401 7399 7402 7400 if (i_getLocationFull() != aLocation) … … 7404 7402 m->strNewLocationFull = aLocation; 7405 7403 m->fMoveThisMedium = true; 7406 rc = S_OK;7407 } 7408 7409 return rc;7404 hrc = S_OK; 7405 } 7406 7407 return hrc; 7410 7408 } 7411 7409 … … 7471 7469 return E_FAIL; 7472 7470 7473 HRESULT rc = S_OK;7471 HRESULT hrc = S_OK; 7474 7472 7475 7473 int vrc = VINF_SUCCESS; … … 7523 7521 ComPtr<IToken> pToken; 7524 7522 if (uOpenFlags & (VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_SHAREABLE)) 7525 rc = LockRead(pToken.asOutParam());7523 hrc = LockRead(pToken.asOutParam()); 7526 7524 else 7527 rc = LockWrite(pToken.asOutParam());7528 if (FAILED( rc)) returnrc;7525 hrc = LockWrite(pToken.asOutParam()); 7526 if (FAILED(hrc)) return hrc; 7529 7527 7530 7528 /* Copies of the input state fields which are not read-only, … … 7731 7729 ComObjPtr<Medium> pParent; 7732 7730 if (RTUuidIsNull(&parentId)) 7733 rc = VBOX_E_OBJECT_NOT_FOUND;7731 hrc = VBOX_E_OBJECT_NOT_FOUND; 7734 7732 else 7735 rc = pVirtualBox->i_findHardDiskById(Guid(parentId), false /* aSetError */, &pParent);7736 if (FAILED( rc))7733 hrc = pVirtualBox->i_findHardDiskById(Guid(parentId), false /* aSetError */, &pParent); 7734 if (FAILED(hrc)) 7737 7735 { 7738 7736 if (fSetImageId && !fSetParentId) … … 7744 7742 * API client wants to adjust a complete medium 7745 7743 * hierarchy one by one. */ 7746 rc = S_OK;7744 hrc = S_OK; 7747 7745 alock.acquire(); 7748 7746 RTUuidClear(&parentId); … … 7857 7855 catch (HRESULT hrcXcpt) 7858 7856 { 7859 rc = hrcXcpt;7857 hrc = hrcXcpt; 7860 7858 } 7861 7859 … … 7863 7861 if (RT_FAILURE(vrc)) 7864 7862 { 7865 lastAccessError = Utf8StrFmt(tr("Could not update and close the medium '%s'%s"),7866 7863 lastAccessError.printf(tr("Could not update and close the medium '%s'%s"), 7864 location.c_str(), i_vdError(vrc).c_str()); 7867 7865 success = false; 7868 7866 throw S_OK; … … 7871 7869 catch (HRESULT hrcXcpt) 7872 7870 { 7873 rc = hrcXcpt;7871 hrc = hrcXcpt; 7874 7872 } 7875 7873 … … 7893 7891 { 7894 7892 m->strLastAccessError = lastAccessError; 7895 Log1WarningFunc(("'%s' is not accessible (error='%s', rc=%Rhrc, vrc=%Rrc)\n",7896 location.c_str(), m->strLastAccessError.c_str(), rc, vrc));7893 Log1WarningFunc(("'%s' is not accessible (error='%s', hrc=%Rhrc, vrc=%Rrc)\n", 7894 location.c_str(), m->strLastAccessError.c_str(), hrc, vrc)); 7897 7895 } 7898 7896 … … 7910 7908 pToken.setNull(); 7911 7909 7912 if (FAILED( rc))7913 return rc;7910 if (FAILED(hrc)) 7911 return hrc; 7914 7912 7915 7913 /* If this is a base image which incorrectly has a parent UUID set, … … 7923 7921 if (fRepairImageZeroParentUuid) 7924 7922 { 7925 rc = LockWrite(pToken.asOutParam());7926 if (FAILED( rc))7923 hrc = LockWrite(pToken.asOutParam()); 7924 if (FAILED(hrc)) 7927 7925 break; 7928 7926 … … 7952 7950 catch (HRESULT hrcXcpt) 7953 7951 { 7954 rc = hrcXcpt;7952 hrc = hrcXcpt; 7955 7953 } 7956 7954 … … 7959 7957 catch (HRESULT hrcXcpt) 7960 7958 { 7961 rc = hrcXcpt;7959 hrc = hrcXcpt; 7962 7960 } 7963 7961 7964 7962 pToken->Abandon(); 7965 7963 pToken.setNull(); 7966 if (FAILED( rc))7964 if (FAILED(hrc)) 7967 7965 break; 7968 7966 } 7969 7967 } while(0); 7970 7968 7971 return rc;7969 return hrc; 7972 7970 } 7973 7971 … … 8011 8009 i_deparent(); 8012 8010 8013 HRESULT rc = m->pVirtualBox->i_unregisterMedium(this);8014 if (FAILED( rc))8011 HRESULT hrc = m->pVirtualBox->i_unregisterMedium(this); 8012 if (FAILED(hrc)) 8015 8013 { 8016 8014 if (pParentBackup) … … 8021 8019 } 8022 8020 8023 return rc;8021 return hrc; 8024 8022 } 8025 8023 … … 8055 8053 HRESULT Medium::i_setStateError() 8056 8054 { 8057 HRESULT rc = E_FAIL;8055 HRESULT hrc; 8058 8056 8059 8057 switch (m->state) 8060 8058 { 8061 8059 case MediumState_NotCreated: 8062 { 8063 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 8064 tr("Storage for the medium '%s' is not created"), 8065 m->strLocationFull.c_str()); 8060 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8061 tr("Storage for the medium '%s' is not created"), 8062 m->strLocationFull.c_str()); 8066 8063 break; 8067 }8068 8064 case MediumState_Created: 8069 { 8070 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 8071 tr("Storage for the medium '%s' is already created"), 8072 m->strLocationFull.c_str()); 8065 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8066 tr("Storage for the medium '%s' is already created"), 8067 m->strLocationFull.c_str()); 8073 8068 break; 8074 }8075 8069 case MediumState_LockedRead: 8076 { 8077 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 8078 tr("Medium '%s' is locked for reading by another task"), 8079 m->strLocationFull.c_str()); 8070 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8071 tr("Medium '%s' is locked for reading by another task"), 8072 m->strLocationFull.c_str()); 8080 8073 break; 8081 }8082 8074 case MediumState_LockedWrite: 8083 { 8084 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 8085 tr("Medium '%s' is locked for writing by another task"), 8086 m->strLocationFull.c_str()); 8075 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8076 tr("Medium '%s' is locked for writing by another task"), 8077 m->strLocationFull.c_str()); 8087 8078 break; 8088 }8089 8079 case MediumState_Inaccessible: 8090 {8091 8080 /* be in sync with Console::powerUpThread() */ 8092 8081 if (!m->strLastAccessError.isEmpty()) 8093 rc = setError(VBOX_E_INVALID_OBJECT_STATE,8094 tr("Medium '%s' is not accessible. %s"),8095 m->strLocationFull.c_str(), m->strLastAccessError.c_str());8082 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8083 tr("Medium '%s' is not accessible. %s"), 8084 m->strLocationFull.c_str(), m->strLastAccessError.c_str()); 8096 8085 else 8097 rc = setError(VBOX_E_INVALID_OBJECT_STATE,8098 tr("Medium '%s' is not accessible"),8099 m->strLocationFull.c_str());8086 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8087 tr("Medium '%s' is not accessible"), 8088 m->strLocationFull.c_str()); 8100 8089 break; 8101 }8102 8090 case MediumState_Creating: 8103 { 8104 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 8105 tr("Storage for the medium '%s' is being created"), 8106 m->strLocationFull.c_str()); 8091 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8092 tr("Storage for the medium '%s' is being created"), 8093 m->strLocationFull.c_str()); 8107 8094 break; 8108 }8109 8095 case MediumState_Deleting: 8110 { 8111 rc = setError(VBOX_E_INVALID_OBJECT_STATE, 8112 tr("Storage for the medium '%s' is being deleted"), 8113 m->strLocationFull.c_str()); 8096 hrc = setError(VBOX_E_INVALID_OBJECT_STATE, 8097 tr("Storage for the medium '%s' is being deleted"), 8098 m->strLocationFull.c_str()); 8114 8099 break; 8115 }8116 8100 default: 8117 {8118 8101 AssertFailed(); 8102 hrc = E_FAIL; 8119 8103 break; 8120 } 8121 } 8122 8123 return rc; 8104 } 8105 8106 return hrc; 8124 8107 } 8125 8108 … … 8248 8231 tr("Could not get the storage format of the medium '%s' (%Rrc)"), 8249 8232 locationFull.c_str(), vrc); 8250 HRESULT rc = i_setFormat(aFormat);8233 HRESULT hrc = i_setFormat(aFormat); 8251 8234 /* setFormat() must not fail since we've just used the backend so 8252 8235 * the format object must be there */ 8253 AssertComRCReturnRC( rc);8236 AssertComRCReturnRC(hrc); 8254 8237 } 8255 8238 else if ( enmType == VDTYPE_INVALID … … 8269 8252 ComAssertRet(backendName != NULL && *backendName != '\0', E_FAIL); 8270 8253 8271 HRESULT rc = i_setFormat(backendName);8254 HRESULT hrc = i_setFormat(backendName); 8272 8255 RTStrFree(backendName); 8273 8256 8274 8257 /* setFormat() must not fail since we've just used the backend so 8275 8258 * the format object must be there */ 8276 AssertComRCReturnRC( rc);8259 AssertComRCReturnRC(hrc); 8277 8260 } 8278 8261 } … … 8399 8382 com::Utf8Str strKey; 8400 8383 8401 HRESULT rc = strFilter.assignEx(aName, 0, offSlash);8402 if (FAILED( rc))8384 HRESULT hrc = strFilter.assignEx(aName, 0, offSlash); 8385 if (FAILED(hrc)) 8403 8386 return false; 8404 8387 8405 rc = strKey.assignEx(aName, offSlash + 1, aName.length() - offSlash - 1); /* Skip slash */8406 if (FAILED( rc))8388 hrc = strKey.assignEx(aName, offSlash + 1, aName.length() - offSlash - 1); /* Skip slash */ 8389 if (FAILED(hrc)) 8407 8390 return false; 8408 8391 … … 8452 8435 8453 8436 if (m->vdError.isEmpty()) 8454 error = Utf8StrFmt(" (%Rrc)", aVRC);8437 error.printf(" (%Rrc)", aVRC); 8455 8438 else 8456 error = Utf8StrFmt(".\n%s", m->vdError.c_str());8439 error.printf(".\n%s", m->vdError.c_str()); 8457 8440 8458 8441 m->vdError.setNull(); … … 8470 8453 * 8471 8454 * @param pvUser The opaque data passed on container creation. 8472 * @param rcThe VBox error code.8455 * @param vrc The VBox error code. 8473 8456 * @param SRC_POS Use RT_SRC_POS. 8474 8457 * @param pszFormat Error message format string. … … 8476 8459 */ 8477 8460 /*static*/ 8478 DECLCALLBACK(void) Medium::i_vdErrorCall(void *pvUser, int rc, RT_SRC_POS_DECL,8461 DECLCALLBACK(void) Medium::i_vdErrorCall(void *pvUser, int vrc, RT_SRC_POS_DECL, 8479 8462 const char *pszFormat, va_list va) 8480 8463 { … … 8484 8467 AssertReturnVoid(that != NULL); 8485 8468 8469 va_list vaCopy; /* For gcc */ 8470 va_copy(vaCopy, va); 8486 8471 if (that->m->vdError.isEmpty()) 8487 that->m->vdError = 8488 Utf8StrFmt("%s (%Rrc)", Utf8Str(pszFormat, va).c_str(), rc); 8472 that->m->vdError.printf("%N (%Rrc)", pszFormat, &vaCopy, vrc); 8489 8473 else 8490 that->m->vdError = 8491 Utf8StrFmt("%s.\n%s (%Rrc)", that->m->vdError.c_str(), 8492 Utf8Str(pszFormat, va).c_str(), rc); 8474 that->m->vdError.appendPrintf(".\n%N (%Rrc)", pszFormat, &vaCopy, vrc); 8475 va_end(vaCopy); 8493 8476 } 8494 8477 … … 8891 8874 * to lock order violations, it probably causes lock order issues related 8892 8875 * to the AutoCaller usage. */ 8893 HRESULT rc = S_OK;8876 HRESULT hrc = S_OK; 8894 8877 8895 8878 /* these parameters we need after creation */ … … 8933 8916 if (capabilities & MediumFormatCapabilities_File) 8934 8917 { 8935 rc = VirtualBox::i_ensureFilePathExists(location, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);8936 if (FAILED( rc))8937 throw rc;8918 hrc = VirtualBox::i_ensureFilePathExists(location, !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */); 8919 if (FAILED(hrc)) 8920 throw hrc; 8938 8921 } 8939 8922 … … 8993 8976 variant = (MediumVariant_T)uImageFlags; 8994 8977 } 8995 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }8978 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 8996 8979 8997 8980 VDDestroy(hdd); 8998 8981 } 8999 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }9000 9001 if (SUCCEEDED( rc))8982 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 8983 8984 if (SUCCEEDED(hrc)) 9002 8985 { 9003 8986 /* register with mVirtualBox as the last step and move to … … 9006 8989 AutoWriteLock treeLock(m->pVirtualBox->i_getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 9007 8990 ComObjPtr<Medium> pMedium; 9008 rc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock);8991 hrc = m->pVirtualBox->i_registerMedium(this, &pMedium, treeLock); 9009 8992 Assert(pMedium == NULL || this == pMedium); 9010 8993 } … … 9013 8996 AutoWriteLock thisLock(this COMMA_LOCKVAL_SRC_POS); 9014 8997 9015 if (SUCCEEDED( rc))8998 if (SUCCEEDED(hrc)) 9016 8999 { 9017 9000 m->state = MediumState_Created; … … 9039 9022 } 9040 9023 9041 if (task.NotifyAboutChanges() && SUCCEEDED( rc))9024 if (task.NotifyAboutChanges() && SUCCEEDED(hrc)) 9042 9025 { 9043 9026 m->pVirtualBox->i_onMediumConfigChanged(this); … … 9045 9028 } 9046 9029 9047 return rc;9030 return hrc; 9048 9031 } 9049 9032 … … 9155 9138 if (capabilities & MediumFormatCapabilities_File) 9156 9139 { 9157 HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation,9158 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);9159 if (FAILED( rc))9160 throw rc;9140 HRESULT hrc = VirtualBox::i_ensureFilePathExists(targetLocation, 9141 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */); 9142 if (FAILED(hrc)) 9143 throw hrc; 9161 9144 } 9162 9145 … … 9355 9338 // just to switch internal state of the lock list to avoid errors during list deletion, 9356 9339 // because all meduims in the list already locked by task.mpMediumLockList 9357 HRESULT rc = pMediumLockListForResize->Lock(true /* fSkipOverLockedMedia */);9358 if (FAILED( rc))9340 HRESULT hrc = pMediumLockListForResize->Lock(true /* fSkipOverLockedMedia */); 9341 if (FAILED(hrc)) 9359 9342 { 9360 9343 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 9361 rc = setError(rc,9362 tr("Failed to lock the medium '%s' to resize before merge"),9363 targetName.c_str());9364 9344 delete pMediumLockListForResize; 9365 throw rc; 9345 throw setError(hrc, 9346 tr("Failed to lock the medium '%s' to resize before merge"), 9347 targetName.c_str()); 9366 9348 } 9367 9349 9368 9350 ComObjPtr<Progress> pProgress(task.GetProgressObject()); 9369 rc = pTarget->i_resize(sourceSize, pMediumLockListForResize, &pProgress, true, false);9370 if (FAILED( rc))9351 hrc = pTarget->i_resize(sourceSize, pMediumLockListForResize, &pProgress, true, false); 9352 if (FAILED(hrc)) 9371 9353 { 9372 9354 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 9373 rc = setError(rc,9374 tr("Failed to set size of '%s' to size of '%s'"),9375 targetName.c_str(), sourceName.c_str());9376 9355 delete pMediumLockListForResize; 9377 throw rc; 9356 throw setError(hrc, 9357 tr("Failed to set size of '%s' to size of '%s'"), 9358 targetName.c_str(), sourceName.c_str()); 9378 9359 } 9379 9360 delete pMediumLockListForResize; … … 9382 9363 { 9383 9364 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 9384 HRESULT rc = setError(VBOX_E_NOT_SUPPORTED, 9385 tr("Sizes of '%s' and '%s' are different and medium format does not support resing"), 9386 sourceName.c_str(), targetName.c_str()); 9387 throw rc; 9365 throw setError(VBOX_E_NOT_SUPPORTED, 9366 tr("Sizes of '%s' and '%s' are different and medium format does not support resing"), 9367 sourceName.c_str(), targetName.c_str()); 9388 9368 } 9389 9369 } … … 9531 9511 ErrorInfoKeeper eik; 9532 9512 MultiResult mrc(rcTmp); 9533 HRESULT rc2;9513 HRESULT hrc2; 9534 9514 9535 9515 std::set<ComObjPtr<Medium> > pMediumsForNotify; … … 9547 9527 /* first, unregister the target since it may become a base 9548 9528 * medium which needs re-registration */ 9549 rc2 = m->pVirtualBox->i_unregisterMedium(pTarget);9550 AssertComRC( rc2);9529 hrc2 = m->pVirtualBox->i_unregisterMedium(pTarget); 9530 AssertComRC(hrc2); 9551 9531 9552 9532 /* then, reparent it and disconnect the deleted branch at both ends … … 9563 9543 /* then, register again */ 9564 9544 ComObjPtr<Medium> pMedium; 9565 rc2 = m->pVirtualBox->i_registerMedium(pTarget, &pMedium, 9566 treeLock); 9567 AssertComRC(rc2); 9545 hrc2 = m->pVirtualBox->i_registerMedium(pTarget, &pMedium, treeLock); 9546 AssertComRC(hrc2); 9568 9547 } 9569 9548 else … … 9625 9604 9626 9605 uIdsForNotify[pMedium->i_getId()] = pMedium->i_getDeviceType(); 9627 rc2 = pMedium->m->pVirtualBox->i_unregisterMedium(pMedium);9628 AssertComRC( rc2);9606 hrc2 = pMedium->m->pVirtualBox->i_unregisterMedium(pMedium); 9607 AssertComRC(hrc2); 9629 9608 9630 9609 /* now, uninitialize the deleted medium (note that … … 9650 9629 * caller added by MergeChain before uninit() and updates the 9651 9630 * iterator to point to the right place. */ 9652 rc2 = task.mpMediumLockList->RemoveByIterator(it);9653 AssertComRC( rc2);9631 hrc2 = task.mpMediumLockList->RemoveByIterator(it); 9632 AssertComRC(hrc2); 9654 9633 9655 9634 if (task.isAsync() || pMedium != this) … … 9815 9794 if (capabilities & MediumFormatCapabilities_File) 9816 9795 { 9817 HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation,9818 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);9819 if (FAILED( rc))9820 throw rc;9796 HRESULT hrc = VirtualBox::i_ensureFilePathExists(targetLocation, 9797 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */); 9798 if (FAILED(hrc)) 9799 throw hrc; 9821 9800 } 9822 9801 … … 10063 10042 { 10064 10043 LogFlowFuncEnter(); 10065 HRESULT rcOut = S_OK;10044 HRESULT hrcOut = S_OK; 10066 10045 10067 10046 /* pTarget is equal "this" in our case */ … … 10077 10056 if (!i_isMoveOperation(pTarget)) 10078 10057 { 10079 HRESULT rc = setError(VBOX_E_FILE_ERROR, 10080 tr("Wrong preconditions for moving the medium %s"), 10081 pTarget->m->strLocationFull.c_str()); 10082 LogFlowFunc(("LEAVE: rc=%Rhrc (early)\n", rc)); 10083 return rc; 10058 LogFlowFunc(("LEAVE: hrc=VBOX_E_FILE_ERROR (early)\n")); 10059 return setError(VBOX_E_FILE_ERROR, 10060 tr("Wrong preconditions for moving the medium %s"), 10061 pTarget->m->strLocationFull.c_str()); 10084 10062 } 10085 10063 … … 10144 10122 if (targetCapabilities & MediumFormatCapabilities_File) 10145 10123 { 10146 HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation,10147 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);10148 if (FAILED( rc))10149 throw rc;10124 HRESULT hrc = VirtualBox::i_ensureFilePathExists(targetLocation, 10125 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */); 10126 if (FAILED(hrc)) 10127 throw hrc; 10150 10128 } 10151 10129 … … 10184 10162 10185 10163 } 10186 catch (HRESULT hrcXcpt) { rcOut = hrcXcpt; }10187 10188 } 10189 catch (HRESULT hrcXcpt) { rcOut = hrcXcpt; }10164 catch (HRESULT hrcXcpt) { hrcOut = hrcXcpt; } 10165 10166 } 10167 catch (HRESULT hrcXcpt) { hrcOut = hrcXcpt; } 10190 10168 10191 10169 VDDestroy(hdd); 10192 10170 } 10193 catch (HRESULT hrcXcpt) { rcOut = hrcXcpt; }10171 catch (HRESULT hrcXcpt) { hrcOut = hrcXcpt; } 10194 10172 10195 10173 ErrorInfoKeeper eik; 10196 MultiResult mrc( rcOut);10174 MultiResult mrc(hrcOut); 10197 10175 10198 10176 // now, at the end of this task (always asynchronous), save the settings … … 10232 10210 { 10233 10211 NOREF(task); 10234 HRESULT rc = S_OK;10212 HRESULT hrc = S_OK; 10235 10213 10236 10214 try … … 10267 10245 10268 10246 } 10269 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10247 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10270 10248 10271 10249 VDDestroy(hdd); 10272 10250 } 10273 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10251 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10274 10252 10275 10253 AutoWriteLock thisLock(this COMMA_LOCKVAL_SRC_POS); … … 10285 10263 unconst(m->id).clear(); 10286 10264 10287 if (task.NotifyAboutChanges() && SUCCEEDED( rc))10265 if (task.NotifyAboutChanges() && SUCCEEDED(hrc)) 10288 10266 { 10289 10267 if (m->pParent.isNotNull()) … … 10292 10270 } 10293 10271 10294 return rc;10272 return hrc; 10295 10273 } 10296 10274 … … 10305 10283 HRESULT Medium::i_taskResetHandler(Medium::ResetTask &task) 10306 10284 { 10307 HRESULT rc = S_OK;10285 HRESULT hrc = S_OK; 10308 10286 10309 10287 uint64_t size = 0, logicalSize = 0; … … 10423 10401 variant = (MediumVariant_T)uImageFlags; 10424 10402 } 10425 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10403 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10426 10404 10427 10405 VDDestroy(hdd); 10428 10406 } 10429 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10407 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10430 10408 10431 10409 AutoWriteLock thisLock(this COMMA_LOCKVAL_SRC_POS); … … 10435 10413 m->variant = variant; 10436 10414 10437 if (task.NotifyAboutChanges() && SUCCEEDED( rc))10415 if (task.NotifyAboutChanges() && SUCCEEDED(hrc)) 10438 10416 m->pVirtualBox->i_onMediumConfigChanged(this); 10439 10417 … … 10441 10419 * as the task destruction also destroys the media chain. */ 10442 10420 10443 return rc;10421 return hrc; 10444 10422 } 10445 10423 … … 10452 10430 HRESULT Medium::i_taskCompactHandler(Medium::CompactTask &task) 10453 10431 { 10454 HRESULT rc = S_OK;10432 HRESULT hrc = S_OK; 10455 10433 10456 10434 /* Lock all in {parent,child} order. The lock is also used as a … … 10529 10507 } 10530 10508 } 10531 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10509 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10532 10510 10533 10511 VDDestroy(hdd); 10534 10512 } 10535 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10536 10537 if (task.NotifyAboutChanges() && SUCCEEDED( rc))10513 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10514 10515 if (task.NotifyAboutChanges() && SUCCEEDED(hrc)) 10538 10516 m->pVirtualBox->i_onMediumConfigChanged(this); 10539 10517 … … 10541 10519 * as the task destruction also destroys the media chain. */ 10542 10520 10543 return rc;10521 return hrc; 10544 10522 } 10545 10523 … … 10552 10530 HRESULT Medium::i_taskResizeHandler(Medium::ResizeTask &task) 10553 10531 { 10554 HRESULT rc = S_OK;10532 HRESULT hrc = S_OK; 10555 10533 10556 10534 uint64_t size = 0, logicalSize = 0; … … 10642 10620 logicalSize = VDGetSize(hdd, VD_LAST_IMAGE); 10643 10621 } 10644 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10622 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10645 10623 10646 10624 VDDestroy(hdd); 10647 10625 } 10648 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }10649 10650 if (SUCCEEDED( rc))10626 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 10627 10628 if (SUCCEEDED(hrc)) 10651 10629 { 10652 10630 AutoWriteLock thisLock(this COMMA_LOCKVAL_SRC_POS); … … 10661 10639 * as the task destruction also destroys the media chain. */ 10662 10640 10663 return rc;10641 return hrc; 10664 10642 } 10665 10643 … … 10753 10731 if (capabilities & MediumFormatCapabilities_File) 10754 10732 { 10755 HRESULT rc = VirtualBox::i_ensureFilePathExists(targetLocation,10756 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */);10757 if (FAILED( rc))10758 throw rc;10733 HRESULT hrc = VirtualBox::i_ensureFilePathExists(targetLocation, 10734 !(task.mVariant & MediumVariant_NoCreateDir) /* fCreate */); 10735 if (FAILED(hrc)) 10736 throw hrc; 10759 10737 } 10760 10738 … … 10988 10966 RT_NOREF(task); 10989 10967 # endif 10990 HRESULT rc = S_OK;10968 HRESULT hrc = S_OK; 10991 10969 10992 10970 /* Lock all in {parent,child} order. The lock is also used as a … … 11004 10982 /* Load the plugin */ 11005 10983 Utf8Str strPlugin; 11006 rc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin);11007 if (SUCCEEDED( rc))10984 hrc = pExtPackManager->i_getLibraryPathForExtPack(g_szVDPlugin, ORACLE_PUEL_EXTPACK_NAME, &strPlugin); 10985 if (SUCCEEDED(hrc)) 11008 10986 { 11009 10987 int vrc = VDPluginLoadFromFilename(strPlugin.c_str()); … … 11173 11151 m->pVirtualBox->i_saveModifiedRegistries(); 11174 11152 } 11175 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }11153 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 11176 11154 11177 11155 if (pvBuf) … … 11184 11162 # endif 11185 11163 } 11186 catch (HRESULT hrcXcpt) { rc = hrcXcpt; }11164 catch (HRESULT hrcXcpt) { hrc = hrcXcpt; } 11187 11165 11188 11166 /* Everything is explicitly unlocked when the task exits, 11189 11167 * as the task destruction also destroys the media chain. */ 11190 11168 11191 return rc;11169 return hrc; 11192 11170 } 11193 11171
Note:
See TracChangeset
for help on using the changeset viewer.