VirtualBox

Changeset 46290 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 27, 2013 3:26:15 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86035
Message:

Main/ApplianceImplExport.cpp: rearrange handling of appliance description lists, always allow the user to override (especially important for the description of a VM, as it defaults to the VM description which some people might not want to export)
Frontends/VBoxManage: finally implement changing the VM description from command line, and also add a way to provide a VM description on export

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

Legend:

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

    r45068 r46290  
    801801        { "--product",            'p', RTGETOPT_REQ_STRING },
    802802        { "--producturl",         'P', RTGETOPT_REQ_STRING },
    803         { "--vendor",             'd', RTGETOPT_REQ_STRING },
    804         { "--vendorurl",          'D', RTGETOPT_REQ_STRING },
     803        { "--vendor",             'n', RTGETOPT_REQ_STRING },
     804        { "--vendorurl",          'N', RTGETOPT_REQ_STRING },
    805805        { "--version",            'v', RTGETOPT_REQ_STRING },
     806        { "--description",        'd', RTGETOPT_REQ_STRING },
    806807        { "--eula",               'e', RTGETOPT_REQ_STRING },
    807808        { "--eulafile",           'E', RTGETOPT_REQ_STRING },
     
    874875                     break;
    875876
    876                 case 'd':   // --vendor
     877                case 'n':   // --vendor
    877878                     if (ulCurVsys == (uint32_t)-1)
    878879                         return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong);
     
    880881                     break;
    881882
    882                 case 'D':   // --vendorurl
     883                case 'N':   // --vendorurl
    883884                     if (ulCurVsys == (uint32_t)-1)
    884885                         return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong);
     
    890891                         return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong);
    891892                     mapArgsMapsPerVsys[ulCurVsys]["version"] = ValueUnion.psz;
     893                     break;
     894
     895                case 'd':   // --description
     896                     if (ulCurVsys == (uint32_t)-1)
     897                         return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong);
     898                     mapArgsMapsPerVsys[ulCurVsys]["description"] = ValueUnion.psz;
    892899                     break;
    893900
     
    10101017                                             Bstr(itD->second).raw(),
    10111018                                             Bstr(itD->second).raw());
     1019                    else if (itD->first == "description")
     1020                        pVSD->AddDescription(VirtualSystemDescriptionType_Description,
     1021                                             Bstr(itD->second).raw(),
     1022                                             Bstr(itD->second).raw());
    10121023                    else if (itD->first == "eula")
    10131024                        pVSD->AddDescription(VirtualSystemDescriptionType_License,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r46123 r46290  
    416416                     "                                    [--vendorurl <vendor url>]\n"
    417417                     "                                    [--version <version info>]\n"
     418                     "                                    [--description <description info>]\n"
    418419                     "                                    [--eula <license text>]\n"
    419420                     "                                    [--eulafile <filename>]\n"
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r46123 r46290  
    5151    MODIFYVM_NAME = 1000,
    5252    MODIFYVM_GROUPS,
     53    MODIFYVM_DESCRIPTION,
    5354    MODIFYVM_OSTYPE,
    5455    MODIFYVM_MEMORY,
     
    211212    { "--name",                     MODIFYVM_NAME,                      RTGETOPT_REQ_STRING },
    212213    { "--groups",                   MODIFYVM_GROUPS,                    RTGETOPT_REQ_STRING },
     214    { "--description",              MODIFYVM_DESCRIPTION,               RTGETOPT_REQ_STRING },
    213215    { "--ostype",                   MODIFYVM_OSTYPE,                    RTGETOPT_REQ_STRING },
    214216    { "--memory",                   MODIFYVM_MEMORY,                    RTGETOPT_REQ_UINT32 },
     
    487489                break;
    488490            }
     491            case MODIFYVM_DESCRIPTION:
     492            {
     493                CHECK_ERROR(machine, COMSETTER(Description)(Bstr(ValueUnion.psz).raw()));
     494                break;
     495            }
    489496            case MODIFYVM_OSTYPE:
    490497            {
Note: See TracChangeset for help on using the changeset viewer.

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