Changeset 27256 in vbox
- Timestamp:
- Mar 10, 2010 4:50:08 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r27179 r27256 1719 1719 if (FAILED(rc)) return rc; 1720 1720 1721 BOOL *pb;1722 1723 1721 switch(property) 1724 1722 { … … 2928 2926 if (fNeedsSaveSettings) 2929 2927 { 2930 alock.release(); 2931 AutoWriteLock vboxlock(this COMMA_LOCKVAL_SRC_POS); 2932 saveSettings(); 2928 bool fNeedsGlobalSaveSettings = false; 2929 saveSettings(&fNeedsGlobalSaveSettings); 2930 2931 if (fNeedsGlobalSaveSettings) 2932 { 2933 alock.release(); 2934 AutoWriteLock vboxlock(this COMMA_LOCKVAL_SRC_POS); 2935 mParent->saveSettings(); 2936 } 2933 2937 } 2934 2938 … … 3306 3310 } 3307 3311 3308 // data is changing and change not vetoed: then write it out under the locks 3309 3310 // saveSettings() needs VirtualBox write lock 3311 AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS); 3312 // data is changing and change not vetoed: then write it out under the lock 3313 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 3312 3314 3313 3315 if (getClassID() == clsidSnapshotMachine) … … 3323 3325 // creates a new key if needed 3324 3326 3325 /* save settings on success */ 3326 HRESULT rc = saveSettings(); 3327 if (FAILED(rc)) return rc; 3327 bool fNeedsGlobalSaveSettings = false; 3328 saveSettings(&fNeedsGlobalSaveSettings); 3329 3330 if (fNeedsGlobalSaveSettings) 3331 { 3332 alock.release(); 3333 AutoWriteLock vboxlock(mParent COMMA_LOCKVAL_SRC_POS); 3334 mParent->saveSettings(); 3335 } 3328 3336 } 3329 3337 … … 3340 3348 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 3341 3349 3342 /* saveSettings() needs mParent lock */ 3343 AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS); 3350 AutoWriteLock mlock(this COMMA_LOCKVAL_SRC_POS); 3344 3351 3345 3352 /* when there was auto-conversion, we want to save the file even if … … 3352 3359 3353 3360 /* save all VM data excluding snapshots */ 3354 return saveSettings(); 3361 bool fNeedsGlobalSaveSettings = false; 3362 rc = saveSettings(&fNeedsGlobalSaveSettings); 3363 mlock.release(); 3364 3365 if (SUCCEEDED(rc) && fNeedsGlobalSaveSettings) 3366 { 3367 AutoWriteLock vlock(mParent COMMA_LOCKVAL_SRC_POS); 3368 rc = mParent->saveSettings(); 3369 } 3370 3371 return rc; 3355 3372 } 3356 3373 … … 5476 5493 ) 5477 5494 { 5478 rc = saveSettings(); 5495 rc = saveSettings(NULL); 5496 // no need to check whether VirtualBox.xml needs saving too since 5497 // we can't have a machine XML file rename pending 5479 5498 if (FAILED(rc)) return rc; 5480 5499 } … … 6840 6859 * @param aNew receives |true| if a virgin settings file was created. 6841 6860 */ 6842 HRESULT Machine::prepareSaveSettings(bool &aRenamed, 6843 bool &aNew) 6844 { 6845 /* Note: tecnhically, mParent needs to be locked only when the machine is 6846 * registered (see prepareSaveSettings() for details) but we don't 6847 * currently differentiate it in callers of saveSettings() so we don't 6848 * make difference here too. */ 6849 AssertReturn(mParent->isWriteLockOnCurrentThread(), E_FAIL); 6861 HRESULT Machine::prepareSaveSettings(bool *pfNeedsGlobalSaveSettings) 6862 { 6850 6863 AssertReturn(isWriteLockOnCurrentThread(), E_FAIL); 6851 6864 6852 6865 HRESULT rc = S_OK; 6853 6866 6854 aRenamed = false; 6855 6856 /* if we're ready and isConfigLocked() is FALSE then it means 6857 * that no config file exists yet (we will create a virgin one) */ 6858 aNew = !mData->m_pMachineConfigFile->fileExists(); 6867 bool fSettingsFileIsNew = !mData->m_pMachineConfigFile->fileExists(); 6859 6868 6860 6869 /* attempt to rename the settings file if machine name is changed */ … … 6864 6873 ) 6865 6874 { 6866 aRenamed = true;6867 6868 6875 bool dirRenamed = false; 6869 6876 bool fileRenamed = false; … … 6893 6900 * above and because name != newName */ 6894 6901 Assert(configDir != newConfigDir); 6895 if (! aNew)6902 if (!fSettingsFileIsNew) 6896 6903 { 6897 6904 /* perform real rename only if the machine is not new */ … … 6921 6928 RTPATH_DELIMITER, 6922 6929 RTPathFilename(configFile.c_str())); 6923 if (! aNew)6930 if (!fSettingsFileIsNew) 6924 6931 { 6925 6932 /* perform real rename only if the machine is not new */ … … 6939 6946 6940 6947 /* update m_strConfigFileFull amd mConfigFile */ 6941 Utf8Str oldConfigFileFull = mData->m_strConfigFileFull;6942 Utf8Str oldConfigFile = mData->m_strConfigFile;6943 6948 mData->m_strConfigFileFull = newConfigFile; 6944 /* try to get the relative path for mConfigFile */ 6949 6950 // compute the relative path too 6945 6951 Utf8Str path = newConfigFile; 6946 6952 mParent->calculateRelativePath(path, path); 6947 6953 mData->m_strConfigFile = path; 6948 6954 6949 /* last, try to update the global settings with the new path */ 6950 if (mData->mRegistered) 6955 // store the old and new so that VirtualBox::saveSettings() can update 6956 // the media registry 6957 if ( mData->mRegistered 6958 && configDir != newConfigDir) 6951 6959 { 6952 rc = mParent->updatePathInMediaRegistry(configDir.c_str(), newConfigDir.c_str()); 6953 if (FAILED(rc)) 6954 { 6955 /* revert to old values */ 6956 mData->m_strConfigFileFull = oldConfigFileFull; 6957 mData->m_strConfigFile = oldConfigFile; 6958 break; 6959 } 6960 mParent->rememberMachineNameChangeForMedia(configDir, newConfigDir); 6961 6962 if (pfNeedsGlobalSaveSettings) 6963 *pfNeedsGlobalSaveSettings = true; 6960 6964 } 6961 6965 … … 7001 7005 } 7002 7006 7003 if ( aNew)7007 if (fSettingsFileIsNew) 7004 7008 { 7005 7009 /* create a virgin config file */ … … 7053 7057 * change machine data directly, not through the backup()/commit() mechanism. 7054 7058 * 7055 * @note Must be called from under mParent write lock (sometimes needed by 7056 * #prepareSaveSettings()) and this object's write lock. Locks children for 7057 * writing. There is one exception when mParent is unused and therefore may be 7058 * left unlocked: if this machine is an unregistered one. 7059 * @note Must be called from under this object's write lock. Locks children for 7060 * writing. 7061 * 7062 * @param pfNeedsGlobalSaveSettings Optional pointer to a bool that must have been 7063 * initialized to false and that will be set to true by this function if 7064 * the caller must invoke VirtualBox::saveSettings() because the global 7065 * settings have changed. This will happen if a machine rename has been 7066 * saved and the global machine and media registries will therefore need 7067 * updating. 7059 7068 */ 7060 HRESULT Machine::saveSettings(int aFlags /*= 0*/) 7069 HRESULT Machine::saveSettings(bool *pfNeedsGlobalSaveSettings, 7070 int aFlags /*= 0*/) 7061 7071 { 7062 7072 LogFlowThisFuncEnter(); 7063 7073 7064 /* Note: tecnhically, mParent needs to be locked only when the machine is7065 * registered (see prepareSaveSettings() for details) but we don't7066 * currently differentiate it in callers of saveSettings() so we don't7067 * make difference here too. */7068 AssertReturn(mParent->isWriteLockOnCurrentThread(), E_FAIL);7069 7074 AssertReturn(isWriteLockOnCurrentThread(), E_FAIL); 7070 7075 … … 7083 7088 * settings directory and file if the machine name was changed and about 7084 7089 * creating a new settings file if this is a new machine. */ 7085 bool fIsRenamed = false; 7086 bool fIsNew = false; 7087 rc = prepareSaveSettings(fIsRenamed, fIsNew); 7090 rc = prepareSaveSettings(pfNeedsGlobalSaveSettings); 7088 7091 if (FAILED(rc)) return rc; 7089 7092 … … 10201 10204 10202 10205 /* save all VM settings */ 10203 rc = saveSettings(); 10206 rc = saveSettings(NULL); 10207 // no need to check whether VirtualBox.xml needs saving also since 10208 // we can't have a name change pending at this point 10204 10209 } 10205 10210 else -
trunk/src/VBox/Main/MediumImpl.cpp
r27232 r27256 2894 2894 LogFlowThisFunc(("locationFull.before='%s'\n", m->strLocationFull.raw())); 2895 2895 2896 Utf8Str path = m->strLocationFull;2897 2898 if (RTPathStartsWith(p ath.c_str(), aOldPath))2899 { 2900 Utf8Str newPath = Utf8StrFmt("%s%s", aNewPath,2901 path.raw() + strlen(aOldPath));2902 path = newPath;2903 2896 const char *pcszMediumPath = m->strLocationFull.c_str(); 2897 2898 if (RTPathStartsWith(pcszMediumPath, aOldPath)) 2899 { 2900 Utf8Str newPath = Utf8StrFmt("%s%s", 2901 aNewPath, 2902 pcszMediumPath + strlen(aOldPath)); 2903 Utf8Str path = newPath; 2904 2904 m->pVirtualBox->calculateRelativePath(path, path); 2905 2906 2905 unconst(m->strLocationFull) = newPath; 2907 2906 unconst(m->strLocation) = path; -
trunk/src/VBox/Main/SnapshotImpl.cpp
r26753 r27256 1260 1260 /* save all current settings to ensure current changes are committed and 1261 1261 * hard disks are fixed up */ 1262 1263 // VirtualBox lock before machine lock 1264 alock.release(); 1265 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 1266 alock.acquire(); 1267 HRESULT rc = saveSettings(); 1262 HRESULT rc = saveSettings(NULL); 1263 // no need to check for whether VirtualBox.xml needs changing since 1264 // we can't have a machine XML rename pending at this point 1268 1265 if (FAILED(rc)) return rc; 1269 1266 } … … 1463 1460 mData->mCurrentStateModified = FALSE; 1464 1461 1465 rc = saveSettings(); 1462 rc = saveSettings(NULL); 1463 // no need to change for whether VirtualBox.xml needs saving since 1464 // we can't have a machine XML rename pending at this point 1466 1465 } 1467 1466 … … 1850 1849 } 1851 1850 1852 alock.leave();1853 1854 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);1855 alock.enter();1856 1857 1851 // save machine settings, reset the modified flag and commit; 1858 rc = saveSettings( SaveS_ResetCurStateModified | saveFlags);1852 rc = saveSettings(&fNeedsSaveSettings, SaveS_ResetCurStateModified | saveFlags); 1859 1853 if (FAILED(rc)) throw rc; 1860 1854 1861 1855 // let go of the locks while we're deleting image files below 1862 1856 alock.leave(); 1863 vboxLock.release();1864 1865 1857 // from here on we cannot roll back on failure any more 1866 1858 … … 1881 1873 { 1882 1874 // finally, VirtualBox.xml needs saving too 1883 vboxLock.acquire();1875 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 1884 1876 mParent->saveSettings(); 1885 1877 } … … 1952 1944 AssertComRCReturn(autoCaller.rc(), autoCaller.rc()); 1953 1945 1954 /* saveSettings() needs mParent lock */ 1955 AutoMultiWriteLock2 alock(mParent, this COMMA_LOCKVAL_SRC_POS); 1946 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1956 1947 1957 1948 // machine must not be running … … 1979 1970 if (m_flModifications) 1980 1971 { 1981 rc = saveSettings(); 1972 rc = saveSettings(NULL); 1973 // no need to change for whether VirtualBox.xml needs saving since 1974 // we can't have a machine XML rename pending at this point 1982 1975 if (FAILED(rc)) return rc; 1983 1976 } … … 2404 2397 if (fMachineSettingsChanged || fNeedsSaveSettings) 2405 2398 { 2406 // saveSettings needs VirtualBox write lock in addition to our own2407 // (parent -> child locking order!)2408 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS);2409 2410 2399 if (fMachineSettingsChanged) 2411 2400 { 2412 2401 AutoWriteLock machineLock(this COMMA_LOCKVAL_SRC_POS); 2413 saveSettings( SaveS_InformCallbacksAnyway);2402 saveSettings(&fNeedsSaveSettings, SaveS_InformCallbacksAnyway); 2414 2403 } 2415 2404 2416 2405 if (fNeedsSaveSettings) 2406 { 2407 AutoWriteLock vboxLock(mParent COMMA_LOCKVAL_SRC_POS); 2417 2408 mParent->saveSettings(); 2409 } 2418 2410 } 2419 2411 } -
trunk/src/VBox/Main/VirtualBoxImpl.cpp
r27179 r27256 223 223 // All the media lists are protected by the following locking handle: 224 224 RWLockHandle lockMedia; 225 MediaOList ollHardDisks, 225 MediaOList ollHardDisks, // base images only! 226 226 ollDVDImages, 227 227 ollFloppyImages; … … 231 231 HardDiskMap mapHardDisks; 232 232 233 // list of pending machine renames (also protected by media tree lock; 234 // see VirtualBox::rememberMachineNameChangeForMedia()) 235 struct PendingMachineRename 236 { 237 Utf8Str strConfigDirOld; 238 Utf8Str strConfigDirNew; 239 }; 240 typedef std::list<PendingMachineRename> PendingMachineRenamesList; 241 PendingMachineRenamesList llPendingMachineRenames; 242 233 243 RWLockHandle lockSharedFolders; 234 244 SharedFoldersOList ollSharedFolders; … … 240 250 ProgressMap mapProgressOperations; 241 251 CallbackList llCallbacks; 242 243 252 244 253 // the following are data for the client watcher thread … … 3245 3254 3246 3255 /** 3256 * Called from Machine::prepareSaveSettings() when it has detected 3257 * that a machine has been renamed. Such renames will require 3258 * updating the global media registry during the 3259 * VirtualBox::saveSettings() that follows later. 3260 * 3261 * When a machine is renamed, there may well be media (in particular, 3262 * diff images for snapshots) in the global registry that will need 3263 * to have their paths updated. Before 3.2, Machine::saveSettings 3264 * used to call VirtualBox::saveSettings implicitly, which was both 3265 * unintuitive and caused locking order problems. Now, we remeber 3266 * such pending name changes with this method so that 3267 * VirtualBox::saveSettings() can process them properly. 3268 */ 3269 void VirtualBox::rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir, 3270 const Utf8Str &strNewConfigDir) 3271 { 3272 AutoWriteLock mediaLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 3273 3274 Data::PendingMachineRename pmr; 3275 pmr.strConfigDirOld = strOldConfigDir; 3276 pmr.strConfigDirNew = strNewConfigDir; 3277 m->llPendingMachineRenames.push_back(pmr); 3278 } 3279 3280 /** 3247 3281 * Helper function to write out the configuration tree. 3248 3282 * 3249 * @note Locks this object for writing and child objects for reading/writing!3283 * @note Caller must have locked the VirtualBox object for writing! 3250 3284 */ 3251 3285 HRESULT VirtualBox::saveSettings() … … 3254 3288 AssertComRCReturn(autoCaller.rc(), autoCaller.rc()); 3255 3289 3290 AssertReturn(isWriteLockOnCurrentThread(), E_FAIL); 3256 3291 AssertReturn(!m->strSettingsFilePath.isEmpty(), E_FAIL); 3257 3292 … … 3260 3295 try 3261 3296 { 3297 // lock the lists while we're here 3298 AutoReadLock machinesLock(m->ollMachines.getLockHandle() COMMA_LOCKVAL_SRC_POS); 3299 3262 3300 // machines 3263 3301 settings::MachinesRegistry machinesTemp; 3264 3302 { 3265 AutoReadLock al(m->ollMachines.getLockHandle() COMMA_LOCKVAL_SRC_POS);3266 3303 for (MachinesOList::iterator it = m->ollMachines.begin(); 3267 3304 it != m->ollMachines.end(); 3268 3305 ++it) 3269 3306 { 3307 Machine *pMachine = *it; 3308 // save actual machine registry entry 3270 3309 settings::MachineRegistryEntry mre; 3271 rc = (*it)->saveRegistryEntry(mre);3310 rc = pMachine->saveRegistryEntry(mre); 3272 3311 machinesTemp.push_back(mre); 3273 3312 } 3274 3313 } 3275 3314 3315 // lock all media for the following; use a write lock because we're 3316 // modifying the PendingMachineRenamesList, which is protected by this 3317 AutoWriteLock mediaLock(getMediaTreeLockHandle() COMMA_LOCKVAL_SRC_POS); 3318 3319 // if a machine was renamed, then we'll need to refresh media paths 3320 if (m->llPendingMachineRenames.size()) 3321 { 3322 // make a single list from the three media lists so we don't need three loops 3323 MediaList llAllMedia; 3324 // with hard disks, we must use the map, not the list, because the list only has base images 3325 for (HardDiskMap::iterator it = m->mapHardDisks.begin(); it != m->mapHardDisks.end(); ++it) 3326 llAllMedia.push_back(it->second); 3327 for (MediaList::iterator it = m->ollDVDImages.begin(); it != m->ollDVDImages.end(); ++it) 3328 llAllMedia.push_back(*it); 3329 for (MediaList::iterator it = m->ollFloppyImages.begin(); it != m->ollFloppyImages.end(); ++it) 3330 llAllMedia.push_back(*it); 3331 3332 for (MediaList::iterator it = llAllMedia.begin(); 3333 it != llAllMedia.end(); 3334 ++it) 3335 { 3336 Medium *pMedium = *it; 3337 for (Data::PendingMachineRenamesList::iterator it2 = m->llPendingMachineRenames.begin(); 3338 it2 != m->llPendingMachineRenames.end(); 3339 ++it2) 3340 { 3341 const Data::PendingMachineRename &pmr = *it2; 3342 const char *pcszOld = pmr.strConfigDirOld.c_str(); 3343 const char *pcszNew = pmr.strConfigDirNew.c_str(); 3344 pMedium->updatePath(pcszOld, pcszNew); 3345 } 3346 } 3347 // done, don't do it again until we have more machine renames 3348 m->llPendingMachineRenames.clear(); 3349 } 3350 3276 3351 // hard disks 3277 3352 settings::MediaList hardDisksTemp; 3278 { 3279 AutoReadLock al(m->ollHardDisks.getLockHandle() COMMA_LOCKVAL_SRC_POS); 3280 for (MediaList::const_iterator it = m->ollHardDisks.begin(); 3281 it != m->ollHardDisks.end(); 3282 ++it) 3283 { 3284 settings::Medium med; 3285 rc = (*it)->saveSettings(med); 3286 if (FAILED(rc)) throw rc; 3287 hardDisksTemp.push_back(med); 3288 } 3353 for (MediaList::const_iterator it = m->ollHardDisks.begin(); 3354 it != m->ollHardDisks.end(); 3355 ++it) 3356 { 3357 settings::Medium med; 3358 rc = (*it)->saveSettings(med); // this recurses into its children 3359 if (FAILED(rc)) throw rc; 3360 hardDisksTemp.push_back(med); 3289 3361 } 3290 3362 3291 3363 /* CD/DVD images */ 3292 3364 settings::MediaList dvdsTemp; 3293 { 3294 AutoReadLock al(m->ollDVDImages.getLockHandle() COMMA_LOCKVAL_SRC_POS); 3295 for (MediaList::const_iterator it = m->ollDVDImages.begin(); 3296 it != m->ollDVDImages.end(); 3297 ++it) 3298 { 3299 settings::Medium med; 3300 rc = (*it)->saveSettings(med); 3301 if (FAILED(rc)) throw rc; 3302 dvdsTemp.push_back(med); 3303 } 3365 for (MediaList::const_iterator it = m->ollDVDImages.begin(); 3366 it != m->ollDVDImages.end(); 3367 ++it) 3368 { 3369 settings::Medium med; 3370 rc = (*it)->saveSettings(med); 3371 if (FAILED(rc)) throw rc; 3372 dvdsTemp.push_back(med); 3304 3373 } 3305 3374 3306 3375 /* floppy images */ 3307 3376 settings::MediaList floppiesTemp; 3308 { 3309 AutoReadLock al(m->ollFloppyImages.getLockHandle() COMMA_LOCKVAL_SRC_POS); 3310 for (MediaList::const_iterator it = m->ollFloppyImages.begin(); 3311 it != m->ollFloppyImages.end(); 3312 ++it) 3313 { 3314 settings::Medium med; 3315 rc = (*it)->saveSettings(med); 3316 if (FAILED(rc)) throw rc; 3317 floppiesTemp.push_back(med); 3318 } 3377 for (MediaList::const_iterator it = m->ollFloppyImages.begin(); 3378 it != m->ollFloppyImages.end(); 3379 ++it) 3380 { 3381 settings::Medium med; 3382 rc = (*it)->saveSettings(med); 3383 if (FAILED(rc)) throw rc; 3384 floppiesTemp.push_back(med); 3319 3385 } 3320 3386 3321 3387 settings::DHCPServersList dhcpServersTemp; 3322 3388 { 3323 AutoReadLock al(m->ollDHCPServers.getLockHandle() COMMA_LOCKVAL_SRC_POS);3389 AutoReadLock dhcpLock(m->ollDHCPServers.getLockHandle() COMMA_LOCKVAL_SRC_POS); 3324 3390 for (DHCPServersOList::const_iterator it = m->ollDHCPServers.begin(); 3325 3391 it != m->ollDHCPServers.end(); … … 3333 3399 } 3334 3400 3335 /* finally, lock VirtualBox object for writing */3336 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);3337 3338 3401 /* now copy the temp data to the config file under the VirtualBox lock */ 3339 3402 m->pMainConfigFile->llMachines = machinesTemp; … … 3648 3711 if (pfNeedsSaveSettings) 3649 3712 *pfNeedsSaveSettings = true; 3650 3651 return rc;3652 }3653 3654 /**3655 * Helper to update the global settings file when the name of some machine3656 * changes so that file and directory renaming occurs. This method ensures that3657 * all affected paths in the disk registry are properly updated.3658 *3659 * @param aOldPath Old path (full).3660 * @param aNewPath New path (full).3661 *3662 * @note Locks this object + DVD, Floppy and HardDisk children for writing.3663 */3664 HRESULT VirtualBox::updatePathInMediaRegistry(const char *aOldPath, const char *aNewPath)3665 {3666 LogFlowThisFunc(("aOldPath={%s} aNewPath={%s}\n", aOldPath, aNewPath));3667 3668 AssertReturn(aOldPath, E_INVALIDARG);3669 AssertReturn(aNewPath, E_INVALIDARG);3670 3671 AutoCaller autoCaller(this);3672 AssertComRCReturn(autoCaller.rc(), autoCaller.rc());3673 3674 RWLockHandle tmpLock(LOCKCLASS_LISTOFMEDIA); // not really necessary but the ObjectsList<> constructor wants one3675 ObjectsList<Medium> ollAll(tmpLock);3676 ollAll.appendOtherList(m->ollDVDImages);3677 ollAll.appendOtherList(m->ollFloppyImages);3678 ollAll.appendOtherList(m->ollHardDisks);3679 3680 for (MediaList::iterator it = ollAll.begin();3681 it != ollAll.end();3682 ++ it)3683 {3684 (*it)->updatePath(aOldPath, aNewPath);3685 }3686 3687 HRESULT rc = saveSettings();3688 3713 3689 3714 return rc; -
trunk/src/VBox/Main/include/MachineImpl.h
r27166 r27256 718 718 }; 719 719 720 HRESULT prepareSaveSettings(bool &aRenamed, bool &aNew);721 HRESULT saveSettings( int aFlags = 0);720 HRESULT prepareSaveSettings(bool *pfNeedsGlobalSaveSettings); 721 HRESULT saveSettings(bool *pfNeedsGlobalSaveSettings, int aFlags = 0); 722 722 723 723 HRESULT saveAllSnapshots(); -
trunk/src/VBox/Main/include/VirtualBoxImpl.h
r27179 r27256 278 278 HRESULT unregisterImage(Medium *aImage, DeviceType_T argType, bool *pfNeedsSaveSettings); 279 279 280 void rememberMachineNameChangeForMedia(const Utf8Str &strOldConfigDir, 281 const Utf8Str &strNewConfigDir); 282 280 283 HRESULT saveSettings(); 281 HRESULT updatePathInMediaRegistry(const char *aOldPath, const char *aNewPath);282 284 283 285 static HRESULT ensureFilePathExists(const Utf8Str &strFileName);
Note:
See TracChangeset
for help on using the changeset viewer.