VirtualBox

Ignore:
Timestamp:
Aug 29, 2012 7:47:42 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80394
Message:

VBoxManage/UpdateAdditions: Implemented --wait-start to only wait for the actual Guest Additions updater being started.

File:
1 edited

Legend:

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

    r43028 r43058  
    260260                 "                            updateadditions\n"
    261261                 "                            [--source <guest additions .ISO>] [--verbose]\n"
     262                 "                            [--wait-start]\n"
    262263                 "\n", pcszSep1, pcszSep2);
    263264}
     
    25302531    Utf8Str strSource;
    25312532    bool fVerbose = false;
     2533    bool fWaitStartOnly = false;
    25322534
    25332535    static const RTGETOPTDEF s_aOptions[] =
    25342536    {
    25352537        { "--source",              's',         RTGETOPT_REQ_STRING  },
    2536         { "--verbose",             'v',         RTGETOPT_REQ_NOTHING }
     2538        { "--verbose",             'v',         RTGETOPT_REQ_NOTHING },
     2539        { "--wait-start",          'w',         RTGETOPT_REQ_NOTHING }
    25372540    };
    25382541
     
    25542557            case 'v':
    25552558                fVerbose = true;
     2559                break;
     2560
     2561            case 'w':
     2562                fWaitStartOnly = true;
    25562563                break;
    25572564
     
    25922599            RTPrintf("Using source: %s\n", strSource.c_str());
    25932600
     2601        com::SafeArray<AdditionsUpdateFlag_T> aUpdateFlags;
     2602        if (fWaitStartOnly)
     2603        {
     2604            aUpdateFlags.push_back(AdditionsUpdateFlag_WaitForUpdateStartOnly);
     2605            if (fVerbose)
     2606                RTPrintf("Preparing and waiting for Guest Additions installer to start ...\n");
     2607        }
     2608
    25942609        ComPtr<IProgress> pProgress;
    2595 
    2596         SafeArray<AdditionsUpdateFlag_T> updateFlags; /* No flags set. */
    25972610        CHECK_ERROR(guest, UpdateGuestAdditions(Bstr(strSource).raw(),
    25982611                                                /* Wait for whole update process to complete. */
    2599                                                 ComSafeArrayAsInParam(updateFlags),
     2612                                                ComSafeArrayAsInParam(aUpdateFlags),
    26002613                                                pProgress.asOutParam()));
    26012614        if (FAILED(rc))
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