Changeset 72476 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 7, 2018 1:49:48 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 122961
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageAppliance.cpp
r69500 r72476 121 121 { "--vmname", 'V', RTGETOPT_REQ_STRING }, 122 122 { "-vmname", 'V', RTGETOPT_REQ_STRING }, // deprecated 123 { "--settingsfile", 'S', RTGETOPT_REQ_STRING }, 124 { "--basefolder", 'p', RTGETOPT_REQ_STRING }, 125 { "--group", 'g', RTGETOPT_REQ_STRING }, 123 126 { "--memory", 'm', RTGETOPT_REQ_STRING }, 124 127 { "-memory", 'm', RTGETOPT_REQ_STRING }, // deprecated … … 193 196 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 194 197 mapArgsMapsPerVsys[ulCurVsys]["vmname"] = ValueUnion.psz; 198 break; 199 200 case 'S': // --settingsfile 201 if (ulCurVsys == (uint32_t)-1) 202 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 203 mapArgsMapsPerVsys[ulCurVsys]["settingsfile"] = ValueUnion.psz; 204 break; 205 206 case 'p': // --basefolder 207 if (ulCurVsys == (uint32_t)-1) 208 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 209 mapArgsMapsPerVsys[ulCurVsys]["basefolder"] = ValueUnion.psz; 210 break; 211 212 case 'g': // --group 213 if (ulCurVsys == (uint32_t)-1) 214 return errorSyntax(USAGE_IMPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 215 mapArgsMapsPerVsys[ulCurVsys]["group"] = ValueUnion.psz; 195 216 break; 196 217 … … 851 872 852 873 case VirtualSystemDescriptionType_SettingsFile: 853 /** @todo VirtualSystemDescriptionType_SettingsFile? */ 854 break; 874 if (findArgValue(strOverride, pmapArgs, "settingsfile")) 875 { 876 bstrFinalValue = strOverride; 877 RTPrintf("%2u: VM settings file name specified with --settingsfile: \"%ls\"\n", 878 a, bstrFinalValue.raw()); 879 } 880 else 881 RTPrintf("%2u: Suggested VM settings file name \"%ls\"" 882 "\n (change with \"--vsys %u --settingsfile <filename>\")\n", 883 a, bstrFinalValue.raw(), i); 884 break; 885 886 case VirtualSystemDescriptionType_BaseFolder: 887 if (findArgValue(strOverride, pmapArgs, "basefolder")) 888 { 889 bstrFinalValue = strOverride; 890 RTPrintf("%2u: VM base folder specified with --basefolder: \"%ls\"\n", 891 a, bstrFinalValue.raw()); 892 } 893 else 894 RTPrintf("%2u: Suggested VM base folder \"%ls\"" 895 "\n (change with \"--vsys %u --basefolder <path>\")\n", 896 a, bstrFinalValue.raw(), i); 897 break; 898 899 case VirtualSystemDescriptionType_PrimaryGroup: 900 if (findArgValue(strOverride, pmapArgs, "group")) 901 { 902 bstrFinalValue = strOverride; 903 RTPrintf("%2u: VM group specified with --group: \"%ls\"\n", 904 a, bstrFinalValue.raw()); 905 } 906 else 907 RTPrintf("%2u: Suggested VM group \"%ls\"" 908 "\n (change with \"--vsys %u --group <group>\")\n", 909 a, bstrFinalValue.raw(), i); 910 break; 911 855 912 case VirtualSystemDescriptionType_Miscellaneous: 856 913 /** @todo VirtualSystemDescriptionType_Miscellaneous? */ … … 947 1004 { "--iso", 'I', RTGETOPT_REQ_NOTHING }, // obsoleted by --options 948 1005 { "--vsys", 's', RTGETOPT_REQ_UINT32 }, 1006 { "--vmname", 'V', RTGETOPT_REQ_STRING }, 949 1007 { "--product", 'p', RTGETOPT_REQ_STRING }, 950 1008 { "--producturl", 'P', RTGETOPT_REQ_STRING }, … … 1020 1078 case 's': // --vsys 1021 1079 ulCurVsys = ValueUnion.u32; 1080 break; 1081 1082 case 'V': // --vmname 1083 if (ulCurVsys == (uint32_t)-1) 1084 return errorSyntax(USAGE_EXPORTAPPLIANCE, "Option \"%s\" requires preceding --vsys argument.", GetState.pDef->pszLong); 1085 mapArgsMapsPerVsys[ulCurVsys]["vmname"] = ValueUnion.psz; 1022 1086 break; 1023 1087 … … 1161 1225 ++itD) 1162 1226 { 1163 if (itD->first == "product") 1227 if (itD->first == "vmname") 1228 pVSD->AddDescription(VirtualSystemDescriptionType_Name, 1229 Bstr(itD->second).raw(), 1230 Bstr(itD->second).raw()); 1231 else if (itD->first == "product") 1164 1232 pVSD->AddDescription(VirtualSystemDescriptionType_Product, 1165 1233 Bstr(itD->second).raw(), -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r72352 r72476 762 762 " [--options manifest|iso|nomacs|nomacsbutnat]\n" 763 763 " [--vsys <number of virtual system>]\n" 764 " [--vmname <name>]\n" 764 765 " [--product <product name>]\n" 765 766 " [--producturl <product url>]\n"
Note:
See TracChangeset
for help on using the changeset viewer.