VirtualBox

Changeset 40241 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Feb 23, 2012 9:03:55 PM (13 years ago)
Author:
vboxsync
Message:

Storage/VDI: Convert block array from/to little endianness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VDI.cpp

    r40240 r40241  
    32443244        }
    32453245
     3246        for (uint32_t i = 0; i < getImageBlocks(&Hdr); i++)
     3247            paBlocks[i] = RT_LE2H_U32(paBlocks[i]);
     3248
    32463249        pu32BlockBitmap = (uint32_t *)RTMemAllocZ(RT_ALIGN_Z(getImageBlocks(&Hdr) / 8, 4));
    32473250        if (!pu32BlockBitmap)
     
    32863289        {
    32873290            for (uint32_t i = 0; i < getImageBlocks(&Hdr); i++)
    3288                 paBlocks[i] = RT_H2BE_U32(paBlocks[i]);
     3291                paBlocks[i] = RT_H2LE_U32(paBlocks[i]);
    32893292
    32903293            vdIfErrorMessage(pIfError, "Writing repaired block allocation table...\n");
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