VirtualBox

Ignore:
Timestamp:
Aug 9, 2012 10:32:48 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79941
Message:

VBoxAutostart: Rewritten config parser for more flexibility in the future, changes config format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostartStart.cpp

    r42527 r42732  
    2323#include <VBox/com/errorprint.h>
    2424
     25#include <iprt/message.h>
    2526#include <iprt/thread.h>
    2627#include <iprt/stream.h>
     
    5152}
    5253
    53 DECLHIDDEN(RTEXITCODE) autostartStartMain(uint32_t uStartupDelay)
     54DECLHIDDEN(RTEXITCODE) autostartStartMain(PCFGAST pCfgAst)
    5455{
    5556    RTEXITCODE rcExit = RTEXITCODE_SUCCESS;
    5657    int vrc = VINF_SUCCESS;
    5758    std::list<AUTOSTARTVM> listVM;
     59    uint32_t uStartupDelay = 0;
     60
     61    pCfgAst = autostartConfigAstGetByName(pCfgAst, "startup_delay");
     62    if (pCfgAst)
     63    {
     64        if (pCfgAst->enmType == CFGASTNODETYPE_KEYVALUE)
     65        {
     66            vrc = RTStrToUInt32Full(pCfgAst->u.KeyValue.aszValue, 10, &uStartupDelay);
     67            if (RT_FAILURE(vrc))
     68                return RTMsgErrorExit(RTEXITCODE_FAILURE, "'startup_delay' must be an unsigned number");
     69        }
     70    }
    5871
    5972    if (uStartupDelay)
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