Changeset 25142 in vbox
- Timestamp:
- Dec 2, 2009 12:02:25 PM (15 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp
r24998 r25142 94 94 { "--vmname", 'V', RTGETOPT_REQ_STRING }, 95 95 { "-vmname", 'V', RTGETOPT_REQ_STRING }, // deprecated 96 { "--memory", 'm', RTGETOPT_REQ_STRING }, 97 { "-memory", 'm', RTGETOPT_REQ_STRING }, // deprecated 98 { "--cpus", 'c', RTGETOPT_REQ_STRING }, 96 99 { "--description", 'd', RTGETOPT_REQ_STRING }, 97 100 { "--eula", 'L', RTGETOPT_REQ_STRING }, … … 171 174 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 172 175 mapArgsMapsPerVsys[ulCurVsys]["memory"] = ValueUnion.psz; 176 break; 177 178 case 'c': // --cpus 179 if (ulCurVsys == (uint32_t)-1) 180 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 181 mapArgsMapsPerVsys[ulCurVsys]["cpus"] = ValueUnion.psz; 173 182 break; 174 183 … … 453 462 454 463 case VirtualSystemDescriptionType_CPU: 455 RTPrintf("%2u: Number of CPUs (ignored): %ls\n", 456 a, aVboxValues[a]); 464 if (findArgValue(strOverride, pmapArgs, "cpus")) 465 { 466 uint32_t cCPUs; 467 if ( (VINF_SUCCESS == strOverride.toInt(cCPUs)) 468 && (cCPUs > 0) 469 && (cCPUs < 33) 470 ) 471 { 472 bstrFinalValue = strOverride; 473 RTPrintf("%2u: No. of CPUs specified with --cpus: %ls\n", 474 a, bstrFinalValue.raw()); 475 } 476 else 477 return errorSyntax(USAGE_IMPORTAPPLIANCE, 478 "Argument to --cpus option must be a number greater than 0 and less than 33."); 479 } 480 else 481 RTPrintf("%2u: Number of CPUs: %ls\n (change with \"--vsys %u --cpus <n>\")\n", 482 a, bstrFinalValue.raw(), i); 457 483 break; 458 484 -
trunk/src/VBox/Main/ApplianceImpl.cpp
r24990 r25142 1235 1235 1236 1236 /* CPU count */ 1237 std::list<VirtualSystemDescriptionEntry*> vsdeCPU = vsdescThis->findByType 1237 std::list<VirtualSystemDescriptionEntry*> vsdeCPU = vsdescThis->findByType(VirtualSystemDescriptionType_CPU); 1238 1238 ComAssertMsgThrow(vsdeCPU.size() == 1, ("CPU count missing"), E_FAIL); 1239 1239 const Utf8Str &cpuVBox = vsdeCPU.front()->strVbox;
Note:
See TracChangeset
for help on using the changeset viewer.