Changeset 24955 in vbox
- Timestamp:
- Nov 25, 2009 2:20:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r24954 r24955 4853 4853 task->mTeleporterEnabled = fTeleporterEnabled; 4854 4854 4855 ULONG cSnapshots; 4856 rc = mMachine->COMGETTER(SnapshotCount)(&cSnapshots); 4855 /* Reset differencing hard disks for which autoReset is true, 4856 * but only if the machine has no snapshots OR the current snapshot 4857 * is an OFFLINE snapshot; otherwise we would reset the current differencing 4858 * image of an ONLINE snapshot which contains the disk state of the machine 4859 * while it was previously running, but without the corresponding machine 4860 * state, which is equivalent to powering off a running machine and not 4861 * good idea 4862 */ 4863 ComPtr<ISnapshot> pCurrentSnapshot; 4864 rc = mMachine->COMGETTER(CurrentSnapshot)(pCurrentSnapshot.asOutParam()); 4857 4865 CheckComRCReturnRC(rc); 4858 4866 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")); 4867 BOOL fCurrentSnapshotIsOnline = false; 4868 if (pCurrentSnapshot) 4869 { 4870 rc = pCurrentSnapshot->COMGETTER(Online)(&fCurrentSnapshotIsOnline); 4871 CheckComRCReturnRC(rc); 4872 } 4873 4874 if (!fCurrentSnapshotIsOnline) 4875 { 4876 LogFlowThisFunc(("Looking for immutable images to reset\n")); 4866 4877 4867 4878 com::SafeIfaceArray<IMediumAttachment> atts; … … 4903 4914 } 4904 4915 else 4905 LogFlowThisFunc(("Machine has %d snapshots, skipping immutable images reset\n", cSnapshots));4916 LogFlowThisFunc(("Machine has a current snapshot which is online, skipping immutable images reset\n")); 4906 4917 4907 4918 rc = consoleInitReleaseLog(mMachine);
Note:
See TracChangeset
for help on using the changeset viewer.