VirtualBox

Changeset 18054 in vbox


Ignore:
Timestamp:
Mar 18, 2009 11:59:04 AM (16 years ago)
Author:
vboxsync
Message:

VHD: Add missing cast to 64bit type when updating the block bitmap in vhdWrite

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp

    r18051 r18054  
    887887        /* Read in the block's bitmap. */
    888888        rc = RTFileReadAt(pImage->File,
    889             (uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry] * VHD_SECTOR_SIZE,
     889            ((uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry]) * VHD_SECTOR_SIZE,
    890890            pImage->pu8Bitmap, pImage->cbDataBlockBitmap, NULL);
    891891        if (RT_SUCCESS(rc))
     
    958958
    959959                cbRead = cSectors * VHD_SECTOR_SIZE;
    960                 Log(("%s: Sectors free: uVhdOffset=%llu cbRead=%u\n", uVhdOffset, cbRead));
     960                Log(("%s: Sectors free: uVhdOffset=%llu cbRead=%u\n", __FUNCTION__, uVhdOffset, cbRead));
    961961                rc = VERR_VD_BLOCK_FREE;
    962962            }
     
    10441044        /* Read in the block's bitmap. */
    10451045        rc = RTFileReadAt(pImage->File,
    1046             (uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry] * VHD_SECTOR_SIZE,
     1046            ((uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry]) * VHD_SECTOR_SIZE,
    10471047            pImage->pu8Bitmap, pImage->cbDataBlockBitmap, NULL);
    10481048        if (RT_SUCCESS(rc))
     
    10611061            /* Write the bitmap back. */
    10621062            rc = RTFileWriteAt(pImage->File,
    1063                 pImage->pBlockAllocationTable[cBlockAllocationTableEntry] * VHD_SECTOR_SIZE,
     1063                ((uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry]) * VHD_SECTOR_SIZE,
    10641064                pImage->pu8Bitmap, pImage->cbDataBlockBitmap, NULL);
    10651065        }
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