- Timestamp:
- Nov 25, 2009 2:01:57 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r24949 r24954 4727 4727 4728 4728 /* the network cards will undergo a quick consistency check */ 4729 for (ULONG slot = 0; slot < SchemaDefs::NetworkAdapterCount; slot ++) 4729 for (ULONG slot = 0; 4730 slot < SchemaDefs::NetworkAdapterCount; 4731 ++slot) 4730 4732 { 4731 4733 ComPtr<INetworkAdapter> adapter; … … 4851 4853 task->mTeleporterEnabled = fTeleporterEnabled; 4852 4854 4853 /* Reset differencing hard disks for which autoReset is true */ 4854 { 4855 ULONG cSnapshots; 4856 rc = mMachine->COMGETTER(SnapshotCount)(&cSnapshots); 4857 CheckComRCReturnRC(rc); 4858 4859 /* Reset differencing hard disks for which autoReset is true, 4860 * but only if the machine does not have any snapshots (otherwise 4861 * the behavior of differencing images would get very confusing) 4862 */ 4863 if (0 == cSnapshots) 4864 { 4865 LogFlowThisFunc(("Machine has no snapshots, looking for immutable images to reset\n")); 4866 4855 4867 com::SafeIfaceArray<IMediumAttachment> atts; 4856 4868 rc = mMachine->COMGETTER(MediumAttachments)(ComSafeArrayAsOutParam(atts)); 4857 4869 CheckComRCReturnRC(rc); 4858 4870 4859 for (size_t i = 0; i < atts.size(); ++ i) 4871 for (size_t i = 0; 4872 i < atts.size(); 4873 ++i) 4860 4874 { 4861 4875 DeviceType_T devType; … … 4888 4902 } 4889 4903 } 4904 else 4905 LogFlowThisFunc(("Machine has %d snapshots, skipping immutable images reset\n", cSnapshots)); 4890 4906 4891 4907 rc = consoleInitReleaseLog(mMachine); -
trunk/src/VBox/Main/MediumImpl.cpp
r24933 r24954 1103 1103 } 1104 1104 1105 /* optional, only for diffs, default is false */ 1105 /* optional, only for diffs, default is false; 1106 * we can only auto-reset diff images, so they 1107 * must not have a parent */ 1106 1108 if (aParent != NULL) 1107 1109 m->autoReset = data.fAutoReset; … … 2522 2524 AutoWriteLock alock(this); 2523 2525 2526 LogFlowThisFunc(("ENTER for medium %s\n", m->strLocationFull.c_str())); 2527 2524 2528 if (mParent.isNull()) 2525 2529 return setError(VBOX_E_NOT_SUPPORTED, … … 2547 2551 * asynchronously */ 2548 2552 2549 std::auto_ptr 2553 std::auto_ptr<Task> task(new Task(this, progress, Task::Reset)); 2550 2554 AssertComRCThrowRC(task->autoCaller.rc()); 2551 2555 … … 2572 2576 progress.queryInterfaceTo(aProgress); 2573 2577 } 2578 2579 LogFlowThisFunc(("LEAVE, rc=%Rhrc\n", rc)); 2574 2580 2575 2581 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.