VirtualBox

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


Ignore:
Timestamp:
May 15, 2009 1:43:22 PM (16 years ago)
Author:
vboxsync
Message:

VHD: Fix chaning UUID of an image

File:
1 edited

Legend:

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

    r19686 r19736  
    379379    ddh.Checksum = RT_H2BE_U32(vhdChecksum(&ddh, sizeof(ddh)));
    380380    rc = RTFileWriteAt(pImage->File, pImage->u64DataOffset, &ddh, sizeof(ddh), NULL);
     381    if (RT_FAILURE(rc))
     382        return rc;
     383
     384    /* Update the VHD footer copy. */
     385    rc = RTFileWriteAt(pImage->File, 0, &pImage->vhdFooterCopy, sizeof(VHDFooter), NULL);
    381386
    382387out:
     
    12211226    {
    12221227        pImage->ImageUuid = *pUuid;
    1223         /**@todo: implement */
     1228        /* Update the footer copy. It will get written to disk when the image is closed. */
     1229        memcpy(&pImage->vhdFooterCopy.UniqueID, pUuid, 16);
    12241230        rc = VINF_SUCCESS;
    12251231    }
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