Changeset 745 in vbox
- Timestamp:
- Feb 7, 2007 12:37:08 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 18397
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r710 r745 36 36 #include <iprt/file.h> 37 37 #include <iprt/string.h> 38 #include <iprt/asm.h> 38 39 39 40 #include "Builtins.h" … … 1601 1602 * means that it's a zero block. Don't need to write anything to this 1602 1603 * block if the data consists of just zeroes. */ 1603 bool fBlockZeroed = true; /* Block is zeroed flag. */ 1604 for (unsigned i = 0; i < (cbToWrite >> 2); i++) 1605 if (((uint32_t *)pvBuf)[i] != 0) 1606 { 1607 /* Block is not zeroed! */ 1608 fBlockZeroed = false; 1609 break; 1610 } 1611 1612 if (fBlockZeroed) 1604 Assert(cbToWrite % 4 == 0); 1605 if (ASMBitFirstSet((volatile void *)pvBuf, cbToWrite * 8) == -1) 1613 1606 { 1614 1607 pImage->paBlocks[uBlock] = VDI_IMAGE_BLOCK_ZERO; … … 2638 2631 2639 2632 /* Check block for data. */ 2640 bool fBlockZeroed = true; /* Block is zeroed flag. */ 2641 for (unsigned i = 0; i < (cbBlock >> 2); i++) 2642 if (((uint32_t *)pvBuf)[i] != 0) 2643 { 2644 /* Block is not zeroed! */ 2645 fBlockZeroed = false; 2646 break; 2647 } 2648 2649 if (!fBlockZeroed) 2633 Assert(cbBlock % 4 == 0); 2634 if (ASMBitFirstSet(pvBuf, cbBlock * 8) != -1) 2650 2635 { 2651 2636 /* Block has a data, may be it must be moved. */
Note:
See TracChangeset
for help on using the changeset viewer.