VirtualBox

Ignore:
Timestamp:
Oct 20, 2020 2:26:02 PM (4 years ago)
Author:
vboxsync
Message:

Fixed bad commit. Hope this help.

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp

    r86648 r86650  
    11131113                        case VirtualSystemDescriptionType_CloudPublicSSHKey:
    11141114                        case VirtualSystemDescriptionType_BootingFirmware:
    1115                         case VirtualSystemDescriptionType_CloudInstanceMetadata:
    1116                         case VirtualSystemDescriptionType_CloudInstanceFreeFormTags:
    1117                         case VirtualSystemDescriptionType_CloudImageFreeFormTags:
    1118 
    11191115                            /** @todo  VirtualSystemDescriptionType_Miscellaneous? */
    11201116                            break;
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp

    r86648 r86650  
    123123    int vrc = RTGetOptInit(&GetState, a->argc, a->argv, s_aOptions, RT_ELEMENTS(s_aOptions), iFirst, 0);
    124124    AssertRCReturn(vrc, RTEXITCODE_FAILURE);
     125    if (a->argc == iFirst)
     126    {
     127        RTPrintf("Empty command parameter list, show help.\n");
     128        printHelp(g_pStdOut);
     129        return RTEXITCODE_SUCCESS;
     130    }
    125131
    126132    Utf8Str strCompartmentId;
     
    289295    int vrc = RTGetOptInit(&GetState, a->argc, a->argv, s_aOptions, RT_ELEMENTS(s_aOptions), iFirst, 0);
    290296    AssertRCReturn(vrc, RTEXITCODE_FAILURE);
     297    if (a->argc == iFirst)
     298    {
     299        RTPrintf("Empty command parameter list, show help.\n");
     300        printHelp(g_pStdOut);
     301        return RTEXITCODE_SUCCESS;
     302    }
    291303
    292304    Utf8Str strCompartmentId;
     
    530542
    531543    Utf8Str strDisplayName, strImageId, strBootVolumeId, strPublicSSHKey;
    532     bool fKeyPresented = false;
    533544    int c;
    534545    while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0)
     
    592603                pVSD->AddDescription(VirtualSystemDescriptionType_CloudPublicSSHKey,
    593604                                     Bstr(ValueUnion.psz).raw(), NULL);
    594                 fKeyPresented = true;
    595605                break;
    596606            case 1001:
     
    610620        return RTEXITCODE_FAILURE;
    611621
    612     if ( fKeyPresented )
    613         if (strPublicSSHKey.isEmpty())
    614             RTPrintf("Warning!!! The value of the passed public SSH key is empty...\n");
    615     else
    616         return errorArgument("Parameter --public-ssh-key is absent. if there is no need to pass a key just use the form"
    617                              " '--public-ssh-key='.");
     622    if (strPublicSSHKey.isEmpty())
     623        RTPrintf("Warning!!! Public SSH key doesn't present in the passed arguments...\n");
    618624
    619625    if (strImageId.isNotEmpty() && strBootVolumeId.isNotEmpty())
     
    781787    };
    782788
    783     const size_t vsdHReadableArraySize = 14;//the number of items in the vsdHReadableArray
     789    const size_t vsdHReadableArraySize = 12;//the number of items in the vsdHReadableArray
    784790    vsdHReadable vsdHReadableArray[vsdHReadableArraySize] = {
    785791        {VirtualSystemDescriptionType_CloudDomain, "Availability domain = %ls\n", "Availability domain wasn't found\n"},
     
    796802        {VirtualSystemDescriptionType_CPU, "CPUs = %ls\n", "Numbers of CPUs weren't found\n"},
    797803        {VirtualSystemDescriptionType_CloudPublicIP, "Instance public IP = %ls\n", "Public IP wasn't found\n"},
    798         {VirtualSystemDescriptionType_CloudInstanceMetadata, "%ls\n", "Metadata weren't found\n"},
    799         {VirtualSystemDescriptionType_CloudInstanceFreeFormTags, "%ls\n", "Instance free-form tags weren't found\n"},
    800         {VirtualSystemDescriptionType_CloudImageFreeFormTags, "%ls\n", "Image free-form tags weren't found\n"}
    801 
     804        {VirtualSystemDescriptionType_Miscellaneous, "%ls\n", "Free-form tags or metadata weren't found\n"}
    802805    };
    803806
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette