VirtualBox

Ignore:
Timestamp:
Mar 13, 2022 8:57:16 PM (3 years ago)
Author:
vboxsync
Message:

doc/manual,FE/VBoxManage: Convert usbdevsource command to refentry documentation, ​bugref:9186

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

Legend:

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

    r94212 r94213  
    256256    { "convertfromraw",     USAGE_S_NEWCMD,HELP_CMD_CONVERTFROMRAW, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
    257257    { "convertdd",          USAGE_S_NEWCMD,HELP_CMD_CONVERTFROMRAW, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
    258     { "usbdevsource",       USAGE_USBDEVSOURCE,     VBMG_CMD_TODO, handleUSBDevSource,         0 },
     258    { "usbdevsource",       USAGE_S_NEWCMD,  HELP_CMD_USBDEVSOURCE, handleUSBDevSource,         0 },
    259259    { "cloudprofile",       USAGE_S_NEWCMD,      HELP_CMD_CLOUDPROFILE, handleCloudProfile,         0 },
    260260    { "cloud",              USAGE_S_NEWCMD,         HELP_CMD_CLOUD, handleCloud,               0 },
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h

    r94212 r94213  
    118118    USAGE_I_GUESTSTATS,
    119119    USAGE_I_REPAIRHD,
    120     USAGE_USBDEVSOURCE,
    121120    /* Insert new entries before this line, but only if it is not an option
    122121     * to go for the new style command and help handling (see e.g. extpack,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r94212 r94213  
    641641                     "\n", SEP);
    642642
    643     if (enmCommand == USAGE_USBDEVSOURCE || enmCommand == USAGE_S_ALL)
    644     {
    645         RTStrmPrintf(pStrm,
    646                            "%s usbdevsource %s    add <source name>\n"
    647                      "                            --backend <backend>\n"
    648                      "                            --address <address>\n"
    649                            "%s usbdevsource %s    remove <source name>\n"
    650                      "\n", SEP, SEP);
    651     }
    652 
    653643#ifndef VBOX_ONLY_DOCS /* Converted to man page, not needed. */
    654644    if (enmCommand == USAGE_S_ALL)
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp

    r94207 r94213  
    569569    /* at least: 0: command, 1: source id */
    570570    if (a->argc < 2)
    571         return errorSyntax(USAGE_USBDEVSOURCE, Usb::tr("Not enough parameters"));
     571        return errorSyntax(Usb::tr("Not enough parameters"));
    572572
    573573    ComPtr<IHost> host;
    574574    if (!strcmp(a->argv[0], "add"))
    575575    {
     576        setCurrentSubcommand(HELP_SCOPE_USBDEVSOURCE_ADD);
     577
    576578        Bstr strBackend;
    577579        Bstr strAddress;
    578580        if (a->argc != 6)
    579             return errorSyntax(USAGE_USBDEVSOURCE, Usb::tr("Invalid number of parameters"));
     581            return errorSyntax(Usb::tr("Invalid number of parameters"));
    580582
    581583        for (int i = 2; i < a->argc; i++)
     
    592594            }
    593595            else
    594                 return errorSyntax(USAGE_USBDEVSOURCE, Usb::tr("Parameter \"%s\" is invalid"), a->argv[i]);
     596                return errorSyntax(Usb::tr("Parameter \"%s\" is invalid"), a->argv[i]);
    595597        }
    596598
     
    605607    else if (!strcmp(a->argv[0], "remove"))
    606608    {
     609        setCurrentSubcommand(HELP_SCOPE_USBDEVSOURCE_REMOVE);
    607610        CHECK_ERROR_RET(a->virtualBox, COMGETTER(Host)(host.asOutParam()), RTEXITCODE_FAILURE);
    608611        CHECK_ERROR_RET(host, RemoveUSBDeviceSource(Bstr(a->argv[1]).raw()), RTEXITCODE_FAILURE);
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