VirtualBox

Changeset 28660 in vbox for trunk/src/VBox/Additions/common


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.

File:
1 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))
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