Changeset 97932 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Dec 31, 2022 9:50:09 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r97931 r97932 1005 1005 { "--variant", 'm', RTGETOPT_REQ_STRING }, 1006 1006 { "-variant", 'm', RTGETOPT_REQ_STRING }, 1007 { "--resize", 'r', RTGETOPT_REQ_UINT64 },1008 1007 }; 1009 1008 … … 1023 1022 MediumVariant_T enmMediumVariant = MediumVariant_Standard; 1024 1023 bool fExisting = false; 1025 bool fNeedResize = false;1026 uint64_t cbResize = 0;1027 1024 1028 1025 int c; … … 1074 1071 if (RT_FAILURE(vrc)) 1075 1072 return errorArgument(Disk::tr("Invalid medium variant '%s'"), ValueUnion.psz); 1076 break;1077 1078 case 'r': // --resize1079 fNeedResize = true;1080 cbResize = ValueUnion.u64 * _1M;1081 1073 break; 1082 1074 … … 1199 1191 } 1200 1192 1201 if (fNeedResize) 1202 { 1203 CHECK_ERROR_BREAK(pSrcMedium, ResizeAndCloneTo(pDstMedium, cbResize, ComSafeArrayAsInParam(l_variants), NULL, pProgress.asOutParam())); 1204 } 1205 else 1206 { 1207 CHECK_ERROR_BREAK(pSrcMedium, CloneTo(pDstMedium, ComSafeArrayAsInParam(l_variants), NULL, pProgress.asOutParam())); 1208 } 1209 1193 CHECK_ERROR_BREAK(pSrcMedium, CloneTo(pDstMedium, ComSafeArrayAsInParam(l_variants), NULL, pProgress.asOutParam())); 1210 1194 1211 1195 hrc = showProgress(pProgress);
Note:
See TracChangeset
for help on using the changeset viewer.