VirtualBox

Changeset 22915 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Sep 10, 2009 1:43:25 PM (15 years ago)
Author:
vboxsync
Message:

VMM: some state stuff (work in progress, back out on bustage).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/VMAll.cpp

    r20874 r22915  
    255255    /*
    256256     * Switch to EMT.
    257      */
    258     va_list va2;
    259     va_copy(va2, va); /* Have to make a copy here or GCC will break. */
     257     *
     258     * If it's a no-wait request, we have to format the message into a buffer
     259     * here since the variable arguments list will become invalid once we call
     260     * va_end and return.
     261     */
    260262    int rc;
    261263    PVMREQ pReq;
     
    263265        ||  VM_IS_EMT(pVM))
    264266    {
     267        fFlags &= ~VMSETRTERR_FLAGS_NO_WAIT;
     268
     269        va_list va2;
     270        va_copy(va2, va); /* Have to make a copy here or GCC will break. */
    265271        rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS,
    266272                          (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2);
     273        va_end(va2);
    267274        if (RT_SUCCESS(rc))
    268275            rc = pReq->iStatus;
    269276    }
    270277    else
     278    {
     279        char *pszMessage = MMR3HeapAPrintfV(pVM, MM_TAG_VM, pszFormat, va);
     280
    271281        rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY, &pReq, 0, VMREQFLAGS_VBOX_STATUS | VMREQFLAGS_NO_WAIT,
    272                           (PFNRT)vmR3SetRuntimeErrorV, 5, pVM, fFlags, pszErrorId, pszFormat, &va2);
     282                          (PFNRT)vmR3SetRuntimeError, 4, pVM, fFlags, pszErrorId, pszMessage);
     283        if (RT_FAILURE(rc))
     284            MMR3HeapFree(pszMessage);
     285    }
    273286    VMR3ReqFree(pReq);
    274     va_end(va2);
    275287
    276288#else
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