VirtualBox

Changeset 1259 in vbox


Ignore:
Timestamp:
Mar 6, 2007 11:16:33 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19204
Message:

show description

File:
1 edited

Legend:

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

    r1061 r1259  
    254254    {
    255255        RTPrintf("VBoxManage showvminfo       <uuid>|<name>\n"
     256                 "                            [-details]\n"
    256257                 "\n");
    257258    }
     
    652653
    653654static HRESULT showVMInfo (ComPtr <IVirtualBox> virtualBox, ComPtr<IMachine> machine,
    654                            ComPtr <IConsole> console = ComPtr <IConsole> ())
     655                           ComPtr <IConsole> console = ComPtr <IConsole> (),
     656                           bool fDetails = false)
    655657{
    656658    HRESULT rc;
     
    13991401    }
    14001402
     1403    if (fDetails)
     1404    {
     1405        Bstr description;
     1406        machine->COMGETTER(Description)(description.asOutParam());
     1407        if (!description.isEmpty())
     1408        {
     1409            RTPrintf("Description:\n%lS\n", description.raw());
     1410        }
     1411    }
     1412
    14011413    /*
    14021414     * snapshots
     
    14191431    HRESULT rc;
    14201432
    1421     /* exactly one option: the UUID or name of the VM */
    1422     if (argc != 1)
     1433    /* at least one option: the UUID or name of the VM */
     1434    if (argc < 1)
    14231435    {
    14241436        return errorSyntax(USAGE_SHOWVMINFO, "Incorrect number of parameters");
     
    14401452    if (FAILED (rc))
    14411453        return 1;
     1454
     1455    /* 2nd option can be -details */
     1456    bool fDetails = false;
     1457    if ((argc == 2) && !strcmp(argv[1], "-details"))
     1458        fDetails = true;
    14421459
    14431460    ComPtr <IConsole> console;
     
    14521469        rc = session->COMGETTER(Console)(console.asOutParam());
    14531470
    1454     rc = showVMInfo (virtualBox, machine, console);
     1471    rc = showVMInfo (virtualBox, machine, console, fDetails);
    14551472
    14561473    if (console)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette