Changeset 25019 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 26, 2009 3:38:39 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 55333
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r24754 r25019 498 498 CHECK_ERROR(mediumFormats [i], 499 499 COMGETTER(FileExtensions) (ComSafeArrayAsOutParam (fileExtensions))); 500 for (size_t a = 0; a < fileExtensions.size(); ++ a)501 { 502 RTPrintf ("%ls", Bstr (fileExtensions [ a]).raw());503 if ( a!= fileExtensions.size()-1)500 for (size_t j = 0; j < fileExtensions.size(); ++ j) 501 { 502 RTPrintf ("%ls", Bstr (fileExtensions [j]).raw()); 503 if (j != fileExtensions.size()-1) 504 504 RTPrintf (","); 505 505 } … … 522 522 if (propertyNames.size() > 0) 523 523 { 524 for (size_t a = 0; a < propertyNames.size(); ++ a)524 for (size_t j = 0; j < propertyNames.size(); ++ j) 525 525 { 526 526 RTPrintf ("\n name='%ls' desc='%ls' type=", 527 Bstr (propertyNames [ a]).raw(), Bstr (propertyDescriptions [a]).raw());528 switch (propertyTypes [ a])527 Bstr (propertyNames [j]).raw(), Bstr (propertyDescriptions [j]).raw()); 528 switch (propertyTypes [j]) 529 529 { 530 530 case DataType_Int32: RTPrintf ("int"); break; … … 532 532 case DataType_String: RTPrintf ("string"); break; 533 533 } 534 RTPrintf (" flags=%#04x", propertyFlags [ a]);535 RTPrintf (" default='%ls'", Bstr (propertyDefaults [ a]).raw());536 if ( a!= propertyNames.size()-1)534 RTPrintf (" flags=%#04x", propertyFlags [j]); 535 RTPrintf (" default='%ls'", Bstr (propertyDefaults [j]).raw()); 536 if (j != propertyNames.size()-1) 537 537 RTPrintf (", "); 538 538 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageMetrics.cpp
r20928 r25019 505 505 ComSafeArrayAsOutParam(retLengths), 506 506 ComSafeArrayAsOutParam(retData)) ); 507 for (unsigned i = 0; i < retNames.size(); i++)508 { 509 Bstr metricUnit(retUnits[ i]);510 Bstr metricName(retNames[ i]);511 RTPrintf("%-12s %-10ls %-20ls ", ts, getObjectName(aVirtualBox, retObjects[ i]).raw(), metricName.raw());507 for (unsigned j = 0; j < retNames.size(); j++) 508 { 509 Bstr metricUnit(retUnits[j]); 510 Bstr metricName(retNames[j]); 511 RTPrintf("%-12s %-10ls %-20ls ", ts, getObjectName(aVirtualBox, retObjects[j]).raw(), metricName.raw()); 512 512 const char *separator = ""; 513 for (unsigned j = 0; j < retLengths[i]; j++)513 for (unsigned k = 0; k < retLengths[j]; k++) 514 514 { 515 if (retScales[ i] == 1)516 RTPrintf("%s%d %ls", separator, retData[retIndices[ i] + j], metricUnit.raw());515 if (retScales[j] == 1) 516 RTPrintf("%s%d %ls", separator, retData[retIndices[j] + k], metricUnit.raw()); 517 517 else 518 RTPrintf("%s%d.%02d%ls", separator, retData[retIndices[ i] + j] / retScales[i],519 (retData[retIndices[ i] + j] * 100 / retScales[i]) % 100, metricUnit.raw());518 RTPrintf("%s%d.%02d%ls", separator, retData[retIndices[j] + k] / retScales[j], 519 (retData[retIndices[j] + k] * 100 / retScales[j]) % 100, metricUnit.raw()); 520 520 separator = ", "; 521 521 } -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
r24879 r25019 240 240 if (!pMachine) 241 241 return 1; 242 Bstr guid ;243 pMachine->COMGETTER(Id)(guid .asOutParam());242 Bstr guidMachine; 243 pMachine->COMGETTER(Id)(guidMachine.asOutParam()); 244 244 245 245 do 246 246 { 247 247 /* we have to open a session for this task. First try an existing session */ 248 rc = a->virtualBox->OpenExistingSession(a->session, guid );248 rc = a->virtualBox->OpenExistingSession(a->session, guidMachine); 249 249 if (FAILED(rc)) 250 CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, guid ));250 CHECK_ERROR_BREAK(a->virtualBox, OpenSession(a->session, guidMachine)); 251 251 ComPtr<IConsole> console; 252 252 CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam())); … … 352 352 353 353 /* assume it's a UUID */ 354 Bstr guid (a->argv[2]);355 if (!guid .isEmpty())356 { 357 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guid , pSnapshot.asOutParam()));354 Bstr guidSnap(a->argv[2]); 355 if (!guidSnap.isEmpty()) 356 { 357 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guidSnap, pSnapshot.asOutParam())); 358 358 } 359 359 else … … 361 361 /* then it must be a name */ 362 362 CHECK_ERROR_BREAK(pMachine, FindSnapshot(Bstr(a->argv[2]), pSnapshot.asOutParam())); 363 pSnapshot->COMGETTER(Id)(guid .asOutParam());363 pSnapshot->COMGETTER(Id)(guidSnap.asOutParam()); 364 364 } 365 365 … … 367 367 if (fDelete) 368 368 { 369 CHECK_ERROR_BREAK(console, DeleteSnapshot(guid , pProgress.asOutParam()));369 CHECK_ERROR_BREAK(console, DeleteSnapshot(guidSnap, pProgress.asOutParam())); 370 370 } 371 371 else … … 404 404 { 405 405 /* assume it's a UUID */ 406 Bstr guid (a->argv[2]);407 if (!guid .isEmpty())408 { 409 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guid , snapshot.asOutParam()));406 Bstr guidSnap(a->argv[2]); 407 if (!guidSnap.isEmpty()) 408 { 409 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guidSnap, snapshot.asOutParam())); 410 410 } 411 411 else … … 467 467 468 468 /* assume it's a UUID */ 469 Bstr guid (a->argv[2]);470 if (!guid .isEmpty())471 { 472 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guid , snapshot.asOutParam()));469 Bstr guidSnap(a->argv[2]); 470 if (!guidSnap.isEmpty()) 471 { 472 CHECK_ERROR_BREAK(pMachine, GetSnapshot(guidSnap, snapshot.asOutParam())); 473 473 } 474 474 else
Note:
See TracChangeset
for help on using the changeset viewer.