Changeset 94212 in vbox for trunk/src/VBox
- Timestamp:
- Mar 13, 2022 8:47:36 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r94211 r94212 242 242 { "signova", USAGE_S_NEWCMD, HELP_CMD_SIGNOVA, handleSignAppliance, VBMG_CMD_F_NO_COM }, 243 243 #ifdef VBOX_WITH_NETFLT 244 { "hostonlyif", USAGE_ HOSTONLYIFS, VBMG_CMD_TODO, handleHostonlyIf, 0 },244 { "hostonlyif", USAGE_S_NEWCMD, HELP_CMD_HOSTONLYIF, handleHostonlyIf, 0 }, 245 245 #endif 246 246 #ifdef VBOX_WITH_VMNET -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r94211 r94212 111 111 USAGE_I_CONVERTTORAW, 112 112 USAGE_I_CONVERTHD, 113 USAGE_HOSTONLYIFS,114 113 USAGE_I_DUMPHDINFO, 115 114 USAGE_STORAGEATTACH, -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r94211 r94212 641 641 "\n", SEP); 642 642 643 #if defined(VBOX_WITH_NETFLT)644 if (enmCommand == USAGE_HOSTONLYIFS || enmCommand == USAGE_S_ALL)645 {646 RTStrmPrintf(pStrm,647 "%s hostonlyif %s ipconfig <name>\n"648 " [--dhcp |\n"649 " --ip <ipv4> [--netmask <ipv4> (def:255.255.255.0)]|\n"650 " --ipv6 <ipv6> [--netmasklengthv6 <N> (def:64)]]", SEP);651 # if !defined(RT_OS_SOLARIS) || defined(VBOX_ONLY_DOCS)652 RTStrmPrintf(pStrm,653 " |\n"654 " create |\n"655 " remove <name>\n");656 # else657 RTStrmPrintf(pStrm,658 "\n");659 # endif660 RTStrmPrintf(pStrm,661 "\n");662 }663 #endif664 665 643 if (enmCommand == USAGE_USBDEVSOURCE || enmCommand == USAGE_S_ALL) 666 644 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHostonly.cpp
r93115 r94212 72 72 73 73 default: 74 return errorGetOpt( USAGE_HOSTONLYIFS,c, &ValueUnion);74 return errorGetOpt(c, &ValueUnion); 75 75 } 76 76 } … … 123 123 case VINF_GETOPT_NOT_OPTION: 124 124 if (pszName) 125 return errorSyntax( USAGE_HOSTONLYIFS,HostOnly::tr("Only one interface name can be specified"));125 return errorSyntax(HostOnly::tr("Only one interface name can be specified")); 126 126 pszName = ValueUnion.psz; 127 127 break; 128 128 129 129 default: 130 return errorGetOpt( USAGE_HOSTONLYIFS,ch, &ValueUnion);130 return errorGetOpt(ch, &ValueUnion); 131 131 } 132 132 if (!pszName) 133 return errorSyntax( USAGE_HOSTONLYIFS,HostOnly::tr("No interface name was specified"));133 return errorSyntax(HostOnly::tr("No interface name was specified")); 134 134 135 135 /* … … 214 214 case VINF_GETOPT_NOT_OPTION: 215 215 if (pszName) 216 return errorSyntax( USAGE_HOSTONLYIFS,HostOnly::tr("Only one interface name can be specified"));216 return errorSyntax(HostOnly::tr("Only one interface name can be specified")); 217 217 pszName = ValueUnion.psz; 218 218 break; 219 219 default: 220 return errorGetOpt( USAGE_HOSTONLYIFS,c, &ValueUnion);220 return errorGetOpt(c, &ValueUnion); 221 221 } 222 222 } … … 224 224 /* parameter sanity check */ 225 225 if (fDhcp && (fNetmasklengthv6 || pszIpv6 || pszIp || pszNetmask)) 226 return errorSyntax(USAGE_HOSTONLYIFS, 227 HostOnly::tr("You can not use --dhcp with static ip configuration parameters: --ip, --netmask, --ipv6 and --netmasklengthv6.")); 226 return errorSyntax(HostOnly::tr("You can not use --dhcp with static ip configuration parameters: --ip, --netmask, --ipv6 and --netmasklengthv6.")); 228 227 if ((pszIp || pszNetmask) && (fNetmasklengthv6 || pszIpv6)) 229 return errorSyntax(USAGE_HOSTONLYIFS, 230 HostOnly::tr("You can not use ipv4 configuration (--ip and --netmask) with ipv6 (--ipv6 and --netmasklengthv6) simultaneously.")); 228 return errorSyntax(HostOnly::tr("You can not use ipv4 configuration (--ip and --netmask) with ipv6 (--ipv6 and --netmasklengthv6) simultaneously.")); 231 229 232 230 ComPtr<IHost> host; … … 261 259 } 262 260 else 263 return errorSyntax( USAGE_HOSTONLYIFS,HostOnly::tr("Neither -dhcp nor -ip nor -ipv6 was specfified"));261 return errorSyntax(HostOnly::tr("Neither -dhcp nor -ip nor -ipv6 was specfified")); 264 262 265 263 return RTEXITCODE_SUCCESS; … … 270 268 { 271 269 if (a->argc < 1) 272 return errorSyntax( USAGE_HOSTONLYIFS,HostOnly::tr("No sub-command specified"));270 return errorSyntax(HostOnly::tr("No sub-command specified")); 273 271 274 272 RTEXITCODE rcExit; 275 273 if (!strcmp(a->argv[0], "ipconfig")) 274 { 275 setCurrentSubcommand(HELP_SCOPE_HOSTONLYIF_IPCONFIG); 276 276 rcExit = handleIpConfig(a); 277 } 277 278 #if defined(VBOX_WITH_NETFLT) && !defined(RT_OS_SOLARIS) 278 279 else if (!strcmp(a->argv[0], "create")) 280 { 281 setCurrentSubcommand(HELP_SCOPE_HOSTONLYIF_CREATE); 279 282 rcExit = handleCreate(a); 283 } 280 284 else if (!strcmp(a->argv[0], "remove")) 285 { 286 setCurrentSubcommand(HELP_SCOPE_HOSTONLYIF_REMOVE); 281 287 rcExit = handleRemove(a); 288 } 282 289 #endif 283 290 else 284 rcExit = errorSyntax( USAGE_HOSTONLYIFS,HostOnly::tr("Unknown sub-command '%s'"), a->argv[0]);291 rcExit = errorSyntax(HostOnly::tr("Unknown sub-command '%s'"), a->argv[0]); 285 292 return rcExit; 286 293 }
Note:
See TracChangeset
for help on using the changeset viewer.