Changeset 79980 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 25, 2019 1:54:08 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r79944 r79980 494 494 495 495 Utf8Str strInstanceId; 496 496 497 int c; 497 498 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 500 501 { 501 502 case 'i': 502 strInstanceId = ValueUnion.psz; 503 break; 503 { 504 if (strInstanceId.isNotEmpty()) 505 return errorArgument("Duplicate parameter: --id"); 506 507 strInstanceId = ValueUnion.psz; 508 if (strInstanceId.isEmpty()) 509 return errorArgument("Empty parameter: --id"); 510 511 break; 512 } 513 504 514 case VINF_GETOPT_NOT_OPTION: 505 515 return errorUnknownSubcommand(ValueUnion.psz); 516 506 517 default: 507 518 return errorGetOpt(c, &ValueUnion); 508 519 } 509 520 } 521 522 if (strInstanceId.isEmpty()) 523 return errorArgument("Missing parameter: --id"); 524 510 525 511 526 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 609 624 610 625 Utf8Str strInstanceId; 626 611 627 int c; 612 628 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 615 631 { 616 632 case 'i': 617 strInstanceId = ValueUnion.psz; 618 break; 633 { 634 if (strInstanceId.isNotEmpty()) 635 return errorArgument("Duplicate parameter: --id"); 636 637 strInstanceId = ValueUnion.psz; 638 if (strInstanceId.isEmpty()) 639 return errorArgument("Empty parameter: --id"); 640 641 break; 642 } 643 619 644 case VINF_GETOPT_NOT_OPTION: 620 645 return errorUnknownSubcommand(ValueUnion.psz); 646 621 647 default: 622 648 return errorGetOpt(c, &ValueUnion); 623 649 } 624 650 } 651 652 if (strInstanceId.isEmpty()) 653 return errorArgument("Missing parameter: --id"); 654 625 655 626 656 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 666 696 667 697 Utf8Str strInstanceId; 698 668 699 int c; 669 700 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 672 703 { 673 704 case 'i': 674 strInstanceId = ValueUnion.psz; 675 break; 705 { 706 if (strInstanceId.isNotEmpty()) 707 return errorArgument("Duplicate parameter: --id"); 708 709 strInstanceId = ValueUnion.psz; 710 if (strInstanceId.isEmpty()) 711 return errorArgument("Empty parameter: --id"); 712 713 break; 714 } 715 676 716 case VINF_GETOPT_NOT_OPTION: 677 717 return errorUnknownSubcommand(ValueUnion.psz); 718 678 719 default: 679 720 return errorGetOpt(c, &ValueUnion); 680 721 } 681 722 } 723 724 if (strInstanceId.isEmpty()) 725 return errorArgument("Missing parameter: --id"); 726 682 727 683 728 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 723 768 724 769 Utf8Str strInstanceId; 770 725 771 int c; 726 772 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 729 775 { 730 776 case 'i': 731 strInstanceId = ValueUnion.psz; 732 break; 777 { 778 if (strInstanceId.isNotEmpty()) 779 return errorArgument("Duplicate parameter: --id"); 780 781 strInstanceId = ValueUnion.psz; 782 if (strInstanceId.isEmpty()) 783 return errorArgument("Empty parameter: --id"); 784 785 break; 786 } 787 733 788 case VINF_GETOPT_NOT_OPTION: 734 789 return errorUnknownSubcommand(ValueUnion.psz); 790 735 791 default: 736 792 return errorGetOpt(c, &ValueUnion); 737 793 } 738 794 } 795 796 if (strInstanceId.isEmpty()) 797 return errorArgument("Missing parameter: --id"); 798 739 799 740 800 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; … … 1233 1293 } 1234 1294 1295 if (strImageId.isEmpty()) 1296 return errorArgument("Missing parameter: --id"); 1297 1298 1235 1299 ComPtr<ICloudProfile> pCloudProfile = pCommonOpts->profile.pCloudProfile; 1236 1300
Note:
See TracChangeset
for help on using the changeset viewer.