VirtualBox

Changeset 28248 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 13, 2010 12:52:38 PM (15 years ago)
Author:
vboxsync
Message:

VBoxManage/Control: More syntax.

File:
1 edited

Legend:

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

    r28247 r28248  
    7171static int handleExecProgram(HandlerArg *a)
    7272{
    73     HRESULT rc = S_OK;
    74 
    7573    /*
    7674     * Check the syntax.  We can deduce the correct syntax from the number of
    7775     * arguments.
    7876     */
    79     bool usageOK = true;
    8077    if (a->argc < 2) /* At least the command we want to execute in the guest should be present :-). */
    8178        return errorSyntax(USAGE_GUESTCONTROL, "Incorrect parameters");
     
    9592
    9693    /* Iterate through all possible commands (if available). */
     94    bool usageOK = true;
    9795    for (int i = 2; usageOK && i < a->argc; i++)
    9896    {
     
    215213    ComPtr<IMachine> machine;
    216214    /* assume it's an UUID */
    217     rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
     215    HRESULT rc = a->virtualBox->GetMachine(Bstr(a->argv[0]), machine.asOutParam());
    218216    if (FAILED(rc) || !machine)
    219217    {
     
    221219        CHECK_ERROR(a->virtualBox, FindMachine(Bstr(a->argv[0]), machine.asOutParam()));
    222220    }
     221
    223222    if (machine)
    224223    {
     
    279278
    280279    /* switch (cmd) */
    281     if (strcmp(a->argv[0], "exec") == 0)
     280    if (   strcmp(a->argv[0], "exec") == 0
     281        || strcmp(a->argv[0], "execute") == 0)
    282282        return handleExecProgram(&arg);
    283283
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