Changeset 16867 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Feb 17, 2009 5:00:56 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 42975
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
r16530 r16867 1248 1248 if (fRegister) 1249 1249 { 1250 ComPtr<IHardDisk 2> hardDisk;1251 CHECK_ERROR(aVirtualBox, OpenHardDisk 2(filename, hardDisk.asOutParam()));1250 ComPtr<IHardDisk> hardDisk; 1251 CHECK_ERROR(aVirtualBox, OpenHardDisk(filename, hardDisk.asOutParam())); 1252 1252 } 1253 1253 -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r16853 r16867 1414 1414 /* first assume it's a UUID */ 1415 1415 Guid uuid(a->argv[2]); 1416 ComPtr<IFloppyImage 2> floppyImage;1416 ComPtr<IFloppyImage> floppyImage; 1417 1417 rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam()); 1418 1418 if (FAILED(rc) || !floppyImage) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r16853 r16867 122 122 return errorArgument("Invalid hard disk type '%s' specified", Utf8Str(type).raw()); 123 123 124 ComPtr<IHardDisk 2> hardDisk;125 CHECK_ERROR(a->virtualBox, CreateHardDisk 2(format, filename, hardDisk.asOutParam()));124 ComPtr<IHardDisk> hardDisk; 125 CHECK_ERROR(a->virtualBox, CreateHardDisk(format, filename, hardDisk.asOutParam())); 126 126 if (SUCCEEDED(rc) && hardDisk) 127 127 { … … 215 215 return errorSyntax(USAGE_MODIFYHD, "Incorrect number of parameters"); 216 216 217 ComPtr<IHardDisk 2> hardDisk;217 ComPtr<IHardDisk> hardDisk; 218 218 Bstr filepath; 219 219 220 220 /* first guess is that it's a UUID */ 221 221 Guid uuid(a->argv[0]); 222 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());222 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 223 223 /* no? then it must be a filename */ 224 224 if (!hardDisk) 225 225 { 226 226 filepath = a->argv[0]; 227 CHECK_ERROR(a->virtualBox, FindHardDisk 2(filepath, hardDisk.asOutParam()));227 CHECK_ERROR(a->virtualBox, FindHardDisk(filepath, hardDisk.asOutParam())); 228 228 } 229 229 … … 277 277 if (!hardDisk) 278 278 { 279 a->virtualBox->OpenHardDisk 2(Bstr(a->argv[0]), hardDisk.asOutParam());279 a->virtualBox->OpenHardDisk(Bstr(a->argv[0]), hardDisk.asOutParam()); 280 280 if (!hardDisk) 281 281 return errorArgument("Hard disk image not found"); … … 354 354 return errorSyntax(USAGE_CLONEHD, "Mandatory output file parameter missing"); 355 355 356 ComPtr<IHardDisk 2> srcDisk;357 ComPtr<IHardDisk 2> dstDisk;356 ComPtr<IHardDisk> srcDisk; 357 ComPtr<IHardDisk> dstDisk; 358 358 bool unknown = false; 359 359 360 360 /* first guess is that it's a UUID */ 361 361 Guid uuid(Utf8Str(src).raw()); 362 rc = a->virtualBox->GetHardDisk 2(uuid, srcDisk.asOutParam());362 rc = a->virtualBox->GetHardDisk(uuid, srcDisk.asOutParam()); 363 363 /* no? then it must be a filename */ 364 364 if (FAILED (rc)) 365 365 { 366 rc = a->virtualBox->FindHardDisk 2(src, srcDisk.asOutParam());366 rc = a->virtualBox->FindHardDisk(src, srcDisk.asOutParam()); 367 367 /* no? well, then it's an unkwnown image */ 368 368 if (FAILED (rc)) 369 369 { 370 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(src, srcDisk.asOutParam()));370 CHECK_ERROR(a->virtualBox, OpenHardDisk(src, srcDisk.asOutParam())); 371 371 if (SUCCEEDED (rc)) 372 372 { … … 387 387 } 388 388 389 CHECK_ERROR_BREAK(a->virtualBox, CreateHardDisk 2(format, dst, dstDisk.asOutParam()));389 CHECK_ERROR_BREAK(a->virtualBox, CreateHardDisk(format, dst, dstDisk.asOutParam())); 390 390 391 391 ComPtr<IProgress> progress; … … 679 679 do 680 680 { 681 ComPtr<IHardDisk 2> hardDisk;681 ComPtr<IHardDisk> hardDisk; 682 682 CHECK_ERROR_BREAK (a->virtualBox, 683 CreateHardDisk 2(Bstr ("iSCSI"),684 685 683 CreateHardDisk(Bstr ("iSCSI"), 684 BstrFmt ("%ls/%ls", server.raw(), target.raw()), 685 hardDisk.asOutParam())); 686 686 CheckComRCBreakRC (rc); 687 687 … … 749 749 return errorSyntax(USAGE_SHOWHDINFO, "Incorrect number of parameters"); 750 750 751 ComPtr<IHardDisk 2> hardDisk;751 ComPtr<IHardDisk> hardDisk; 752 752 Bstr filepath; 753 753 … … 756 756 /* first guess is that it's a UUID */ 757 757 Guid uuid(a->argv[0]); 758 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());758 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 759 759 /* no? then it must be a filename */ 760 760 if (FAILED (rc)) 761 761 { 762 762 filepath = a->argv[0]; 763 rc = a->virtualBox->FindHardDisk 2(filepath, hardDisk.asOutParam());763 rc = a->virtualBox->FindHardDisk(filepath, hardDisk.asOutParam()); 764 764 /* no? well, then it's an unkwnown image */ 765 765 if (FAILED (rc)) 766 766 { 767 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(filepath, hardDisk.asOutParam()));767 CHECK_ERROR(a->virtualBox, OpenHardDisk(filepath, hardDisk.asOutParam())); 768 768 if (SUCCEEDED (rc)) 769 769 { … … 891 891 } 892 892 893 ComPtr<IHardDisk 2> hardDisk;894 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(filepath, hardDisk.asOutParam()));893 ComPtr<IHardDisk> hardDisk; 894 CHECK_ERROR(a->virtualBox, OpenHardDisk(filepath, hardDisk.asOutParam())); 895 895 if (SUCCEEDED(rc) && hardDisk) 896 896 { … … 914 914 else if (strcmp(a->argv[0], "floppy") == 0) 915 915 { 916 ComPtr<IFloppyImage 2> floppyImage;916 ComPtr<IFloppyImage> floppyImage; 917 917 CHECK_ERROR(a->virtualBox, OpenFloppyImage(filepath, Guid(), floppyImage.asOutParam())); 918 918 } … … 935 935 if (strcmp(a->argv[0], "disk") == 0) 936 936 { 937 ComPtr<IHardDisk 2> hardDisk;938 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());937 ComPtr<IHardDisk> hardDisk; 938 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 939 939 /* not a UUID or not registered? Then it must be a filename */ 940 940 if (!hardDisk) 941 941 { 942 CHECK_ERROR(a->virtualBox, FindHardDisk 2(Bstr(a->argv[1]), hardDisk.asOutParam()));942 CHECK_ERROR(a->virtualBox, FindHardDisk(Bstr(a->argv[1]), hardDisk.asOutParam())); 943 943 } 944 944 if (SUCCEEDED(rc) && hardDisk) … … 965 965 if (strcmp(a->argv[0], "floppy") == 0) 966 966 { 967 ComPtr<IFloppyImage 2> floppyImage;967 ComPtr<IFloppyImage> floppyImage; 968 968 rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam()); 969 969 /* not a UUID or not registered? Then it must be a filename */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r16853 r16867 384 384 case DriveState_ImageMounted: 385 385 { 386 ComPtr<IFloppyImage 2> floppyImage;386 ComPtr<IFloppyImage> floppyImage; 387 387 rc = floppyDrive->GetImage(floppyImage.asOutParam()); 388 388 if (SUCCEEDED(rc) && floppyImage) … … 461 461 if (fSataEnabled) 462 462 { 463 ComPtr<IHardDisk 2> hardDisk;463 ComPtr<IHardDisk> hardDisk; 464 464 Bstr filePath; 465 465 ULONG cSataPorts; … … 468 468 for (ULONG i = 0; i < cSataPorts; ++ i) 469 469 { 470 rc = machine->GetHardDisk 2(StorageBus_SATA, i, 0, hardDisk.asOutParam());470 rc = machine->GetHardDisk(StorageBus_SATA, i, 0, hardDisk.asOutParam()); 471 471 if (SUCCEEDED(rc) && hardDisk) 472 472 { … … 512 512 RTPrintf("IDE Controller: %s\n", pszIdeController); 513 513 514 ComPtr<IHardDisk 2> hardDisk;514 ComPtr<IHardDisk> hardDisk; 515 515 Bstr filePath; 516 rc = machine->GetHardDisk 2(StorageBus_IDE, 0, 0, hardDisk.asOutParam());516 rc = machine->GetHardDisk(StorageBus_IDE, 0, 0, hardDisk.asOutParam()); 517 517 if (SUCCEEDED(rc) && hardDisk) 518 518 { … … 532 532 RTPrintf("hda=\"none\"\n"); 533 533 } 534 rc = machine->GetHardDisk 2(StorageBus_IDE, 0, 1, hardDisk.asOutParam());534 rc = machine->GetHardDisk(StorageBus_IDE, 0, 1, hardDisk.asOutParam()); 535 535 if (SUCCEEDED(rc) && hardDisk) 536 536 { … … 550 550 RTPrintf("hdb=\"none\"\n"); 551 551 } 552 rc = machine->GetHardDisk 2(StorageBus_IDE, 1, 1, hardDisk.asOutParam());552 rc = machine->GetHardDisk(StorageBus_IDE, 1, 1, hardDisk.asOutParam()); 553 553 if (SUCCEEDED(rc) && hardDisk) 554 554 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp
r16853 r16867 389 389 if (strcmp(a->argv[0], "hdds") == 0) 390 390 { 391 com::SafeIfaceArray <IHardDisk2> hdds;392 CHECK_ERROR(a->virtualBox, COMGETTER(HardDisks 2)(ComSafeArrayAsOutParam (hdds)));391 com::SafeIfaceArray<IHardDisk> hdds; 392 CHECK_ERROR(a->virtualBox, COMGETTER(HardDisks)(ComSafeArrayAsOutParam (hdds))); 393 393 for (size_t i = 0; i < hdds.size(); ++ i) 394 394 { 395 ComPtr<IHardDisk 2> hdd = hdds[i];395 ComPtr<IHardDisk> hdd = hdds[i]; 396 396 Guid uuid; 397 397 hdd->COMGETTER(Id)(uuid.asOutParam()); … … 452 452 if (strcmp(a->argv[0], "floppies") == 0) 453 453 { 454 com::SafeIfaceArray<IFloppyImage 2> floppies;454 com::SafeIfaceArray<IFloppyImage> floppies; 455 455 CHECK_ERROR(a->virtualBox, COMGETTER(FloppyImages)(ComSafeArrayAsOutParam(floppies))); 456 456 for (size_t i = 0; i < floppies.size(); ++ i) 457 457 { 458 ComPtr<IFloppyImage 2> floppyImage = floppies[i];458 ComPtr<IFloppyImage> floppyImage = floppies[i]; 459 459 Guid uuid; 460 460 floppyImage->COMGETTER(Id)(uuid.asOutParam()); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r16853 r16867 980 980 if (strcmp(hdds[0], "none") == 0) 981 981 { 982 machine->DetachHardDisk 2(StorageBus_IDE, 0, 0);982 machine->DetachHardDisk(StorageBus_IDE, 0, 0); 983 983 } 984 984 else … … 986 986 /* first guess is that it's a UUID */ 987 987 Guid uuid(hdds[0]); 988 ComPtr<IHardDisk 2> hardDisk;989 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());988 ComPtr<IHardDisk> hardDisk; 989 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 990 990 /* not successful? Then it must be a filename */ 991 991 if (!hardDisk) 992 992 { 993 CHECK_ERROR(a->virtualBox, FindHardDisk 2(Bstr(hdds[0]), hardDisk.asOutParam()));993 CHECK_ERROR(a->virtualBox, FindHardDisk(Bstr(hdds[0]), hardDisk.asOutParam())); 994 994 if (FAILED(rc)) 995 995 { 996 996 /* open the new hard disk object */ 997 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(Bstr(hdds[0]), hardDisk.asOutParam()));997 CHECK_ERROR(a->virtualBox, OpenHardDisk(Bstr(hdds[0]), hardDisk.asOutParam())); 998 998 } 999 999 } … … 1001 1001 { 1002 1002 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1003 CHECK_ERROR(machine, AttachHardDisk 2(uuid, StorageBus_IDE, 0, 0));1003 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_IDE, 0, 0)); 1004 1004 } 1005 1005 else … … 1013 1013 if (strcmp(hdds[1], "none") == 0) 1014 1014 { 1015 machine->DetachHardDisk 2(StorageBus_IDE, 0, 1);1015 machine->DetachHardDisk(StorageBus_IDE, 0, 1); 1016 1016 } 1017 1017 else … … 1019 1019 /* first guess is that it's a UUID */ 1020 1020 Guid uuid(hdds[1]); 1021 ComPtr<IHardDisk 2> hardDisk;1022 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());1021 ComPtr<IHardDisk> hardDisk; 1022 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 1023 1023 /* not successful? Then it must be a filename */ 1024 1024 if (!hardDisk) 1025 1025 { 1026 CHECK_ERROR(a->virtualBox, FindHardDisk 2(Bstr(hdds[1]), hardDisk.asOutParam()));1026 CHECK_ERROR(a->virtualBox, FindHardDisk(Bstr(hdds[1]), hardDisk.asOutParam())); 1027 1027 if (FAILED(rc)) 1028 1028 { 1029 1029 /* open the new hard disk object */ 1030 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(Bstr(hdds[1]), hardDisk.asOutParam()));1030 CHECK_ERROR(a->virtualBox, OpenHardDisk(Bstr(hdds[1]), hardDisk.asOutParam())); 1031 1031 } 1032 1032 } … … 1034 1034 { 1035 1035 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1036 CHECK_ERROR(machine, AttachHardDisk 2(uuid, StorageBus_IDE, 0, 1));1036 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_IDE, 0, 1)); 1037 1037 } 1038 1038 else … … 1046 1046 if (strcmp(hdds[2], "none") == 0) 1047 1047 { 1048 machine->DetachHardDisk 2(StorageBus_IDE, 1, 1);1048 machine->DetachHardDisk(StorageBus_IDE, 1, 1); 1049 1049 } 1050 1050 else … … 1052 1052 /* first guess is that it's a UUID */ 1053 1053 Guid uuid(hdds[2]); 1054 ComPtr<IHardDisk 2> hardDisk;1055 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());1054 ComPtr<IHardDisk> hardDisk; 1055 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 1056 1056 /* not successful? Then it must be a filename */ 1057 1057 if (!hardDisk) 1058 1058 { 1059 CHECK_ERROR(a->virtualBox, FindHardDisk 2(Bstr(hdds[2]), hardDisk.asOutParam()));1059 CHECK_ERROR(a->virtualBox, FindHardDisk(Bstr(hdds[2]), hardDisk.asOutParam())); 1060 1060 if (FAILED(rc)) 1061 1061 { 1062 1062 /* open the new hard disk object */ 1063 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(Bstr(hdds[2]), hardDisk.asOutParam()));1063 CHECK_ERROR(a->virtualBox, OpenHardDisk(Bstr(hdds[2]), hardDisk.asOutParam())); 1064 1064 } 1065 1065 } … … 1067 1067 { 1068 1068 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1069 CHECK_ERROR(machine, AttachHardDisk 2(uuid, StorageBus_IDE, 1, 1));1069 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_IDE, 1, 1)); 1070 1070 } 1071 1071 else … … 1210 1210 /* first assume it's a UUID */ 1211 1211 Guid uuid(floppy); 1212 ComPtr<IFloppyImage 2> floppyImage;1212 ComPtr<IFloppyImage> floppyImage; 1213 1213 rc = a->virtualBox->GetFloppyImage(uuid, floppyImage.asOutParam()); 1214 1214 if (FAILED(rc) || !floppyImage) … … 1747 1747 if (strcmp(hdds[i], "none") == 0) 1748 1748 { 1749 machine->DetachHardDisk 2(StorageBus_SATA, i-4, 0);1749 machine->DetachHardDisk(StorageBus_SATA, i-4, 0); 1750 1750 } 1751 1751 else … … 1753 1753 /* first guess is that it's a UUID */ 1754 1754 Guid uuid(hdds[i]); 1755 ComPtr<IHardDisk 2> hardDisk;1756 rc = a->virtualBox->GetHardDisk 2(uuid, hardDisk.asOutParam());1755 ComPtr<IHardDisk> hardDisk; 1756 rc = a->virtualBox->GetHardDisk(uuid, hardDisk.asOutParam()); 1757 1757 /* not successful? Then it must be a filename */ 1758 1758 if (!hardDisk) 1759 1759 { 1760 CHECK_ERROR(a->virtualBox, FindHardDisk 2(Bstr(hdds[i]), hardDisk.asOutParam()));1760 CHECK_ERROR(a->virtualBox, FindHardDisk(Bstr(hdds[i]), hardDisk.asOutParam())); 1761 1761 if (FAILED(rc)) 1762 1762 { 1763 1763 /* open the new hard disk object */ 1764 CHECK_ERROR(a->virtualBox, OpenHardDisk 2(Bstr(hdds[i]), hardDisk.asOutParam()));1764 CHECK_ERROR(a->virtualBox, OpenHardDisk(Bstr(hdds[i]), hardDisk.asOutParam())); 1765 1765 } 1766 1766 } … … 1768 1768 { 1769 1769 hardDisk->COMGETTER(Id)(uuid.asOutParam()); 1770 CHECK_ERROR(machine, AttachHardDisk 2(uuid, StorageBus_SATA, i-4, 0));1770 CHECK_ERROR(machine, AttachHardDisk(uuid, StorageBus_SATA, i-4, 0)); 1771 1771 } 1772 1772 else
Note:
See TracChangeset
for help on using the changeset viewer.