Changeset 20695 in vbox
- Timestamp:
- Jun 18, 2009 5:08:08 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48800
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp
r20473 r20695 956 956 uint32_t iBATEntryIndexCurr = cBATEntryIndex + 1; 957 957 958 cSectors = 1; 959 958 960 /* 959 961 * The first sector being read is marked dirty, read as much as we … … 961 963 * must be read from child. 962 964 */ 963 do965 while (cSectors < (cbRead / VHD_SECTOR_SIZE)) 964 966 { 965 cSectors++;966 967 967 968 iBitmap = iBATEntryIndexCurr / 8; /* Byte in the block bitmap. */ 968 969 iBitInByte = (8 - 1) - (iBATEntryIndexCurr % 8); 969 970 puBitmap = pImage->pu8Bitmap + iBitmap; 971 AssertMsg(puBitmap < (pImage->pu8Bitmap + pImage->cbDataBlockBitmap), 972 ("VHD: Current bitmap position exceeds maximum size of the bitmap\n")); 970 973 if (!ASMBitTest(puBitmap, iBitInByte)) 971 974 break; 972 975 973 976 iBATEntryIndexCurr++; 974 } while (cSectors < (cbRead / VHD_SECTOR_SIZE)); 977 cSectors++; 978 } 975 979 976 980 cbRead = cSectors * VHD_SECTOR_SIZE; … … 991 995 * should be read from the parent. 992 996 */ 993 do 997 998 cSectors = 1; 999 1000 while (cSectors < (cbRead / VHD_SECTOR_SIZE)) 994 1001 { 995 cSectors++;996 997 1002 iBitmap = iBATEntryIndexCurr / 8; /* Byte in the block bitmap. */ 998 1003 iBitInByte = (8 - 1) - (iBATEntryIndexCurr % 8); 999 1004 puBitmap = pImage->pu8Bitmap + iBitmap; 1005 AssertMsg(puBitmap < (pImage->pu8Bitmap + pImage->cbDataBlockBitmap), 1006 ("VHD: Current bitmap position exceeds maximum size of the bitmap\n")); 1000 1007 if (ASMBitTest(puBitmap, iBitInByte)) 1001 1008 break; 1002 1009 1003 1010 iBATEntryIndexCurr++; 1004 } while (cSectors < (cbRead / VHD_SECTOR_SIZE)); 1011 cSectors++; 1012 } 1005 1013 1006 1014 cbRead = cSectors * VHD_SECTOR_SIZE;
Note:
See TracChangeset
for help on using the changeset viewer.