Changeset 14225 in vbox for trunk/src/VBox/Main/HardDisk2Impl.cpp
- Timestamp:
- Nov 14, 2008 5:55:28 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 39341
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HardDisk2Impl.cpp
r14224 r14225 1653 1653 /* delegate the rest to the profi */ 1654 1654 cancelMergeTo (aChain); 1655 } 1656 1657 /** 1658 * Returns a preferred format for differencing hard disks. 1659 */ 1660 Bstr HardDisk2::preferredDiffFormat() 1661 { 1662 Bstr format; 1663 1664 AutoCaller autoCaller (this); 1665 AssertComRCReturn (autoCaller.rc(), format); 1666 1667 /* mm.format is const, no need to lock */ 1668 format = mm.format; 1669 1670 /* check that our own format supports diffs */ 1671 1672 /* lock system properties now to make the format check atomic with 1673 * defaultHardDiskFormat() */ 1674 AutoReadLock propsLock (mVirtualBox->systemProperties()); 1675 1676 ComObjPtr <HardDiskFormat> formatObj = 1677 mVirtualBox->systemProperties()->hardDiskFormat (format); 1678 AssertReturn (!formatObj.isNull(), format); 1679 1680 if (!(formatObj->capabilities() & HardDiskFormatCapabilities_Differencing)) 1681 format = mVirtualBox->systemProperties()->defaultHardDiskFormat(); 1682 1683 return format; 1655 1684 } 1656 1685
Note:
See TracChangeset
for help on using the changeset viewer.