VirtualBox

Changeset 28660 in vbox


Ignore:
Timestamp:
Apr 23, 2010 3:35:17 PM (15 years ago)
Author:
vboxsync
Message:

Guest Control: Reverted r60506, r60507, r60509, added argv[0] in VBoxManage instead.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp

    r28649 r28660  
    616616    pData->uNumArgs = 0; /* Initialize in case of RTGetOptArgvFromString() is failing ... */
    617617
    618     /* Prepare argument list. Always add actual command line as first argument (argv[0]). */
    619     char *pszArgsTemp = NULL;
    620     int rc = RTStrAPrintf(&pszArgsTemp, "%s %s", pszCmd, (uNumArgs > 0) ? pszArgs : "");
    621     if (RT_SUCCESS(rc) && pszArgsTemp)
    622     {
    623         rc = RTGetOptArgvFromString(&pData->papszArgs, (int*)&pData->uNumArgs,
    624                                     pszArgsTemp, NULL);
    625         RTStrFree(pszArgsTemp);
    626     }
    627 
    628     /* Did we get at least as much arguments as told? */
    629     Assert(pData->uNumArgs >= uNumArgs);
     618    /* Prepare argument list. */
     619    int rc = RTGetOptArgvFromString(&pData->papszArgs, (int*)&pData->uNumArgs,
     620                                    (uNumArgs > 0) ? pszArgs : "", NULL);
     621    /* Did we get the same result? */
     622    Assert(uNumArgs == pData->uNumArgs);
    630623
    631624    if (RT_SUCCESS(rc))
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp

    r28634 r28660  
    9393    bool verbose = false;
    9494    bool have_timeout = false;
     95
     96    /* Always use the actual command line as argv[0]. */
     97    args.push_back(Bstr(Utf8Cmd));
    9598
    9699    /* Iterate through all possible commands (if available). */
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