Changeset 28249 in vbox
- Timestamp:
- Apr 13, 2010 1:42:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r27916 r28249 72 72 { 73 73 HRESULT rc; 74 for (size_t i = 0; i < aMedia.size(); ++ 74 for (size_t i = 0; i < aMedia.size(); ++i) 75 75 { 76 76 ComPtr<IMedium> hdd = aMedia[i]; … … 134 134 com::SafeArray<BSTR> machineIds; 135 135 hdd->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds)); 136 for (size_t j = 0; j < machineIds.size(); ++ 136 for (size_t j = 0; j < machineIds.size(); ++j) 137 137 { 138 138 ComPtr<IMachine> machine; … … 141 141 Bstr name; 142 142 machine->COMGETTER(Name)(name.asOutParam()); 143 RTPrintf("%s%lS (UUID: %lS) \n",143 RTPrintf("%s%lS (UUID: %lS)", 144 144 j == 0 ? "Usage: " : " ", 145 145 name.raw(), machineIds[j]); 146 com::SafeArray<BSTR> snapshotIds; 147 hdd->COMGETTER(SnapshotIds)(machineIds[j], 148 ComSafeArrayAsOutParam(snapshotIds)); 149 for (size_t k = 0; k < snapshotIds.size(); ++k) 150 { 151 ComPtr<ISnapshot> snapshot; 152 machine->GetSnapshot(snapshotIds[k], snapshot.asOutParam()); 153 if (snapshot) 154 { 155 Bstr snapshotName; 156 snapshot->COMGETTER(Name)(snapshotName.asOutParam()); 157 RTPrintf(" [%lS (UUID: %lS)]", snapshotName.raw(), snapshotIds[k]); 158 } 159 } 160 RTPrintf("\n"); 146 161 } 147 162 RTPrintf("\n"); … … 296 311 * Iterate through the collection 297 312 */ 298 for (size_t i = 0; i < machines.size(); ++ 313 for (size_t i = 0; i < machines.size(); ++i) 299 314 { 300 315 if (machines[i]) … … 319 334 * Iterate through the collection 320 335 */ 321 for (size_t i = 0; i < machines.size(); ++ 336 for (size_t i = 0; i < machines.size(); ++i) 322 337 { 323 338 if (machines[i]) … … 354 369 * Iterate through the collection. 355 370 */ 356 for (size_t i = 0; i < coll.size(); ++ 371 for (size_t i = 0; i < coll.size(); ++i) 357 372 { 358 373 ComPtr<IGuestOSType> guestOS; … … 377 392 if (SUCCEEDED(rc)) 378 393 { 379 for (size_t i = 0; i < coll.size(); ++ 394 for (size_t i = 0; i < coll.size(); ++i) 380 395 { 381 396 ComPtr<IMedium> dvdDrive = coll[i]; … … 573 588 574 589 RTPrintf("Supported hard disk backends:\n\n"); 575 for (size_t i = 0; i < mediumFormats.size(); ++ 590 for (size_t i = 0; i < mediumFormats.size(); ++i) 576 591 { 577 592 /* General information */ … … 594 609 CHECK_ERROR(mediumFormats[i], 595 610 COMGETTER(FileExtensions)(ComSafeArrayAsOutParam(fileExtensions))); 596 for (size_t j = 0; j < fileExtensions.size(); ++ 611 for (size_t j = 0; j < fileExtensions.size(); ++j) 597 612 { 598 613 RTPrintf("%ls", Bstr(fileExtensions[j]).raw()); … … 618 633 if (propertyNames.size() > 0) 619 634 { 620 for (size_t j = 0; j < propertyNames.size(); ++ 635 for (size_t j = 0; j < propertyNames.size(); ++j) 621 636 { 622 637 RTPrintf("\n name='%ls' desc='%ls' type=", … … 651 666 com::SafeIfaceArray<IMedium> dvds; 652 667 CHECK_ERROR(a->virtualBox, COMGETTER(DVDImages)(ComSafeArrayAsOutParam(dvds))); 653 for (size_t i = 0; i < dvds.size(); ++ 668 for (size_t i = 0; i < dvds.size(); ++i) 654 669 { 655 670 ComPtr<IMedium> dvdImage = dvds[i]; … … 666 681 com::SafeArray<BSTR> machineIds; 667 682 dvdImage->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds)); 668 for (size_t j = 0; j < machineIds.size(); ++ 683 for (size_t j = 0; j < machineIds.size(); ++j) 669 684 { 670 685 ComPtr<IMachine> machine; … … 687 702 com::SafeIfaceArray<IMedium> floppies; 688 703 CHECK_ERROR(a->virtualBox, COMGETTER(FloppyImages)(ComSafeArrayAsOutParam(floppies))); 689 for (size_t i = 0; i < floppies.size(); ++ 704 for (size_t i = 0; i < floppies.size(); ++i) 690 705 { 691 706 ComPtr<IMedium> floppyImage = floppies[i]; … … 702 717 com::SafeArray<BSTR> machineIds; 703 718 floppyImage->COMGETTER(MachineIds)(ComSafeArrayAsOutParam(machineIds)); 704 for (size_t j = 0; j < machineIds.size(); ++ 719 for (size_t j = 0; j < machineIds.size(); ++j) 705 720 { 706 721 ComPtr<IMachine> machine; … … 937 952 com::SafeIfaceArray<IDHCPServer> svrs; 938 953 CHECK_ERROR(a->virtualBox, COMGETTER(DHCPServers)(ComSafeArrayAsOutParam(svrs))); 939 for (size_t i = 0; i < svrs.size(); ++ 954 for (size_t i = 0; i < svrs.size(); ++i) 940 955 { 941 956 ComPtr<IDHCPServer> svr = svrs[i]; … … 983 998 CHECK_ERROR(nic, COMGETTER(NatDriver)(driver.asOutParam())); 984 999 CHECK_ERROR(driver, COMGETTER(Redirects)(ComSafeArrayAsOutParam(rules))); 985 for (size_t i = 0; i < rules.size(); ++ 1000 for (size_t i = 0; i < rules.size(); ++i) 986 1001 { 987 1002 uint16_t port = 0;
Note:
See TracChangeset
for help on using the changeset viewer.