diff options
| author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-03-07 12:42:31 +0000 |
|---|---|---|
| committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-03-07 12:42:31 +0000 |
| commit | cc4fd1da2948e82af2f66630821f03b4df7544a3 (patch) | |
| tree | 730115c773818f11332cf8193e9f9d495721f7b4 /src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp | |
| parent | ddbb1b4c2984b0d9760b12b117704355ac9e13ce (diff) | |
| download | VirtualBox-svn-cc4fd1da2948e82af2f66630821f03b4df7544a3.tar.gz | |
VBoxManage: Re-do help category handling (command/sub-command specific help) for old-style commands to lift the low limit of the bit field approach for everything. This is now much closer to the handling of new-style commands, but far from converting anything old. While at it I eliminated the need to define an entry in the (old-style) USAGECATEGORY enum for new-style commands.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@77595 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp')
| -rw-r--r-- | src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp index 1bd46669e51..5aaefb1bb83 100644 --- a/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp +++ b/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp @@ -197,9 +197,9 @@ RTEXITCODE handleUSBFilter(HandlerArg *a) if (a->argc < 6) { if (cmd.mAction == USBFilterCmd::Add) - return errorSyntax(USAGE_USBFILTER_ADD, "Not enough parameters"); + return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, "Not enough parameters"); - return errorSyntax(USAGE_USBFILTER_MODIFY, "Not enough parameters"); + return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_MODIFY, "Not enough parameters"); } // set Active to true by default @@ -328,7 +328,7 @@ RTEXITCODE handleUSBFilter(HandlerArg *a) return errorArgument("Invalid USB filter action '%s'", a->argv[i]); } else - return errorSyntax(cmd.mAction == USBFilterCmd::Add ? USAGE_USBFILTER_ADD : USAGE_USBFILTER_MODIFY, + return errorSyntaxEx(USAGE_USBFILTER, cmd.mAction == USBFilterCmd::Add ? HELP_SCOPE_USBFILTER_ADD : HELP_SCOPE_USBFILTER_MODIFY, "Unknown option '%s'", a->argv[i]); } @@ -346,7 +346,7 @@ RTEXITCODE handleUSBFilter(HandlerArg *a) && !cmd.mFilter.mRemote.isEmpty()) ) { - return errorSyntax(USAGE_USBFILTER_ADD, "Mandatory options not supplied"); + return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_ADD, "Mandatory options not supplied"); } } break; @@ -356,7 +356,7 @@ RTEXITCODE handleUSBFilter(HandlerArg *a) { /* at least: 0: command, 1: index, 2: --target, 3: <target value> */ if (a->argc < 4) - return errorSyntax(USAGE_USBFILTER_REMOVE, "Not enough parameters"); + return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, "Not enough parameters"); for (int i = 2; i < a->argc; i++) { @@ -378,7 +378,7 @@ RTEXITCODE handleUSBFilter(HandlerArg *a) // mandatory options if (!cmd.mGlobal && !cmd.mMachine) - return errorSyntax(USAGE_USBFILTER_REMOVE, "Mandatory options not supplied"); + return errorSyntaxEx(USAGE_USBFILTER, HELP_SCOPE_USBFILTER_REMOVE, "Mandatory options not supplied"); break; } |
