VirtualBox

Changeset 44621 in vbox


Ignore:
Timestamp:
Feb 11, 2013 10:10:51 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83708
Message:

DevEFI.cpp: Fixed assertion in nvramStore (forgot it yesterday).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/DevEFI.cpp

    r44620 r44621  
    387387static int nvramStore(PDEVEFI pThis)
    388388{
    389     int rc = pThis->Lun0.pNvramDrv->pfnVarStoreSeqBegin(pThis->Lun0.pNvramDrv, pThis->NVRAM.cVariables);
     389    /*
     390     * Count the non-volatile variables and issue the begin call.
     391     */
     392    PEFIVAR  pEfiVar;
     393    uint32_t cNonVolatile = 0;
     394    RTListForEach(&pThis->NVRAM.VarList, pEfiVar, EFIVAR, ListNode)
     395        if (pEfiVar->fAttributes & VBOX_EFI_VARIABLE_NON_VOLATILE)
     396            cNonVolatile++;
     397    int rc = pThis->Lun0.pNvramDrv->pfnVarStoreSeqBegin(pThis->Lun0.pNvramDrv, cNonVolatile);
    390398    if (RT_SUCCESS(rc))
    391399    {
     400        /*
     401         * Store each non-volatile variable.
     402         */
    392403        uint32_t    idxVar  = 0;
    393         PEFIVAR     pEfiVar;
    394404        RTListForEach(&pThis->NVRAM.VarList, pEfiVar, EFIVAR, ListNode)
    395405        {
     
    408418            idxVar++;
    409419        }
    410         Assert((pThis->NVRAM.cVariables == idxVar));
     420        Assert(idxVar == cNonVolatile);
     421
     422        /*
     423         * Done.
     424         */
    411425        rc = pThis->Lun0.pNvramDrv->pfnVarStoreSeqEnd(pThis->Lun0.pNvramDrv, rc);
    412426    }
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