Changeset 66997 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- May 22, 2017 8:38:38 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r66250 r66997 942 942 else 943 943 { 944 /* use the format of the source medium if unspecified */ 944 /* 945 * In case the format is unspecified check that the source medium supports 946 * image creation and use the same format for the destination image. 947 * Use the default image format if it is not supported. 948 */ 945 949 if (format.isEmpty()) 946 CHECK_ERROR_BREAK(pSrcMedium, COMGETTER(Format)(format.asOutParam())); 950 { 951 ComPtr<IMediumFormat> pMediumFmt; 952 com::SafeArray<MediumFormatCapabilities_T> l_caps; 953 CHECK_ERROR_BREAK(pSrcMedium, COMGETTER(MediumFormat)(pMediumFmt.asOutParam())); 954 CHECK_ERROR_BREAK(pMediumFmt, COMGETTER(Capabilities)(ComSafeArrayAsOutParam(l_caps))); 955 ULONG caps=0; 956 for (size_t i = 0; i < l_caps.size(); i++) 957 caps |= l_caps[i]; 958 if (caps & ( MediumFormatCapabilities_CreateDynamic 959 | MediumFormatCapabilities_CreateFixed)) 960 CHECK_ERROR_BREAK(pMediumFmt, COMGETTER(Id)(format.asOutParam())); 961 } 947 962 Utf8Str strFormat(format); 948 963 if (cmd == CMD_DISK)
Note:
See TracChangeset
for help on using the changeset viewer.