VirtualBox

Changeset 5277 in vbox for trunk


Ignore:
Timestamp:
Oct 12, 2007 7:36:33 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
25274
Message:

Made it possible to clone old images (setting the UUID setting failed).

File:
1 edited

Legend:

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

    r4442 r5277  
    25152515    if (!pImage->fReadOnly)
    25162516    {
    2517         /* we only support new images */
    25182517        if (GET_MAJOR_HEADER_VERSION(&pImage->Header) == 1)
    25192518        {
     
    25292528            if (pParentModificationUuid)
    25302529                pImage->Header.u.v1.uuidParentModify = *pParentModificationUuid;
     2530
     2531            /* write out new header */
     2532            rc = vdiUpdateHeader(pImage);
     2533            AssertMsgRC(rc, ("vdiUpdateHeader() failed, filename=\"%s\", rc=%Vrc\n",
     2534                             pImage->szFilename, rc));
     2535        }
     2536        /* Make it possible to clone old VDIs. */
     2537        else if (   GET_MAJOR_HEADER_VERSION(&pImage->Header) == 0
     2538                 && !pParentUuid
     2539                 && !pParentModificationUuid)
     2540        {
     2541            if (pUuid)
     2542                pImage->Header.u.v0.uuidCreate = *pUuid;
     2543
     2544            if (pModificationUuid)
     2545                pImage->Header.u.v0.uuidModify = *pModificationUuid;
    25312546
    25322547            /* write out new header */
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