VirtualBox

Ignore:
Timestamp:
Oct 21, 2010 2:56:22 PM (14 years ago)
Author:
vboxsync
Message:

VBoxHeadless: unbreak --startvm UUID (yesterday's regresssion)

File:
1 edited

Legend:

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

    r33294 r33313  
    548548              "(C) 2008-" VBOX_C_YEAR " " VBOX_VENDOR "\n"
    549549              "All rights reserved.\n\n");
    550 
    551     Bstr id;
    552     /* the below cannot be Bstr because on Linux Bstr doesn't work until XPCOM (nsMemory) is initialized */
    553     const char *name = NULL;
    554550
    555551#ifdef VBOX_FFMPEG
     
    616612    };
    617613
     614    const char *pcszNameOrUUID = NULL;
     615
    618616    // parse the command line
    619617    int ch;
     
    626624        {
    627625            case 's':
    628                 id = asGuidStr(ValueUnion.psz);
    629                 /* If the argument was not a UUID, then it must be a name. */
    630                 if (id.isEmpty())
    631                     name = ValueUnion.psz;
     626                pcszNameOrUUID = ValueUnion.psz;
    632627                break;
    633628#ifdef VBOX_WITH_VRDP
     
    746741#endif /* defined VBOX_FFMPEG */
    747742
    748     if (id.isEmpty() && !name)
     743    if (!pcszNameOrUUID)
    749744    {
    750745        show_usage();
     
    793788        ComPtr<IMachine> m;
    794789
    795         rc = virtualBox->FindMachine(Bstr(name).raw(), m.asOutParam());
     790        rc = virtualBox->FindMachine(Bstr(pcszNameOrUUID).raw(), m.asOutParam());
    796791        if (FAILED(rc))
    797792        {
     
    799794            break;
    800795        }
     796        Bstr id;
    801797        m->COMGETTER(Id)(id.asOutParam());
    802798        AssertComRC(rc);
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