VirtualBox

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


Ignore:
Timestamp:
Mar 13, 2022 7:48:18 PM (3 years ago)
Author:
vboxsync
Message:

doc/manual,FE/VBoxManage: Convert guestproperty 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

    r94207 r94208  
    232232    { "sharedfolder",       USAGE_S_NEWCMD, HELP_CMD_SHAREDFOLDER, handleSharedFolder,         0 },
    233233#ifdef VBOX_WITH_GUEST_PROPS
    234     { "guestproperty",      USAGE_GUESTPROPERTY,    VBMG_CMD_TODO, handleGuestProperty,        0 },
     234    { "guestproperty",      USAGE_S_NEWCMD,HELP_CMD_GUESTPROPERTY, handleGuestProperty,        0 },
    235235#endif
    236236#ifdef VBOX_WITH_GUEST_CONTROL
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h

    r94207 r94208  
    109109    USAGE_I_MODUNINSTALL,
    110110    USAGE_I_RENAMEVMDK,
    111 #ifdef VBOX_WITH_GUEST_PROPS
    112     USAGE_GUESTPROPERTY,
    113 #endif  /* VBOX_WITH_GUEST_PROPS defined */
    114111    USAGE_I_CONVERTTORAW,
    115112    USAGE_METRICS,
     
    255252RTEXITCODE handleDebugVM(HandlerArg *a);
    256253
    257 /* VBoxManageGuestProp.cpp */
    258 extern void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2);
    259 
    260254/* VBoxManageGuestCtrl.cpp */
    261255extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r94184 r94208  
    5454
    5555
    56 void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2)
    57 {
    58     RTStrmPrintf(pStrm, "%s guestproperty %s   get <uuid|vmname>\n"
    59                   "                            <property> [--verbose]\n"
    60                   "\n", pcszSep1, pcszSep2);
    61     RTStrmPrintf(pStrm, "%s guestproperty %s   set <uuid|vmname>\n"
    62                   "                            <property> [<value> [--flags <flags>]]\n"
    63                   "\n", pcszSep1, pcszSep2);
    64     RTStrmPrintf(pStrm, "%s guestproperty %s   delete|unset <uuid|vmname>\n"
    65                   "                            <property>\n"
    66                   "\n", pcszSep1, pcszSep2);
    67     RTStrmPrintf(pStrm, "%s guestproperty %s   enumerate <uuid|vmname>\n"
    68                   "                            [--patterns <patterns>]\n"
    69                   "\n", pcszSep1, pcszSep2);
    70     RTStrmPrintf(pStrm, "%s guestproperty %s   wait <uuid|vmname> <patterns>\n"
    71                   "                            [--timeout <msec>] [--fail-on-timeout]\n"
    72                   "\n", pcszSep1, pcszSep2);
    73 }
    74 
    7556#ifndef VBOX_ONLY_DOCS
    7657
     
    7859{
    7960    HRESULT rc = S_OK;
     61
     62    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_GET);
    8063
    8164    bool verbose = false;
     
    8568        verbose = true;
    8669    else if (a->argc != 2)
    87         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     70        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    8871
    8972    ComPtr<IMachine> machine;
     
    121104    HRESULT rc = S_OK;
    122105
     106    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_SET);
     107
    123108    /*
    124109     * Check the syntax.  We can deduce the correct syntax from the number of
     
    144129        usageOK = false;
    145130    if (!usageOK)
    146         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     131        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    147132    /* This is always needed. */
    148133    pszName = a->argv[1];
     
    179164    HRESULT rc = S_OK;
    180165
     166    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_UNSET);
     167
    181168    /*
    182169     * Check the syntax.  We can deduce the correct syntax from the number of
     
    188175        usageOK = false;
    189176    if (!usageOK)
    190         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     177        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    191178    /* This is always needed. */
    192179    pszName = a->argv[1];
     
    221208static RTEXITCODE handleEnumGuestProperty(HandlerArg *a)
    222209{
     210    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_ENUMERATE);
     211
    223212    /*
    224213     * Check the syntax.  We can deduce the correct syntax from the number of
     
    230219             && strcmp(a->argv[1], "--patterns")
    231220             && strcmp(a->argv[1], "-patterns")))
    232         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     221        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    233222
    234223    /*
     
    283272static RTEXITCODE handleWaitGuestProperty(HandlerArg *a)
    284273{
     274    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_WAIT);
     275
    285276    /*
    286277     * Handle arguments
     
    317308    }
    318309    if (!usageOK)
    319         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     310        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    320311
    321312    /*
     
    420411
    421412    if (a->argc == 0)
    422         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     413        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    423414
    424415    /* switch (cmd) */
     
    435426
    436427    /* default: */
    437     return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     428    return errorSyntax(GuestProp::tr("Incorrect parameters"));
    438429}
    439430
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r94207 r94208  
    639639                     "\n", SEP);
    640640
    641 #ifdef VBOX_WITH_GUEST_PROPS
    642     if (enmCommand == USAGE_GUESTPROPERTY || enmCommand == USAGE_S_ALL)
    643         usageGuestProperty(pStrm, SEP);
    644 #endif /* VBOX_WITH_GUEST_PROPS defined */
    645 
    646641#ifdef VBOX_WITH_GUEST_CONTROL
    647642    if (enmCommand == USAGE_GUESTCONTROL || enmCommand == USAGE_S_ALL)
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