VirtualBox

Changeset 24122 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Oct 28, 2009 2:35:40 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54029
Message:

VHD: Update the footer and BAT after we appended a new block to the file to prevent VHD corruption

File:
1 edited

Legend:

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

    r23973 r24122  
    12861286             */
    12871287            rc = vhdFileWriteSync(pImage, pImage->uCurrentEndOfFile, pNewBlock, cbNewBlock, NULL);
     1288            AssertRC(rc);
    12881289
    12891290            /*
     
    12931294            pImage->uCurrentEndOfFile += cbNewBlock;
    12941295            RTMemFree(pNewBlock);
     1296
     1297            /* Write the updated BAT and the footer to remain in a consistent state. */
     1298            rc = vhdFlush(pImage);
     1299            AssertRC(rc);
    12951300        }
    12961301
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