VirtualBox

Changeset 31258 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Jul 30, 2010 6:26:09 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64274
Message:

Main/Medium+Storage/VBoxHDD: fix incorrect handling of diff media in VirtualBox::OpenHardDisk

File:
1 edited

Legend:

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

    r31185 r31258  
    33833383            }
    33843384        }
     3385
     3386        /* Ensure we always get correct diff information, even if the backend
     3387         * doesn't actually have a stored flag for this. It must not return
     3388         * bogus information for the parent UUID if it is not a diff image. */
     3389        RTUUID parentUuid;
     3390        RTUuidClear(&parentUuid);
     3391        rc2 = pImage->Backend->pfnGetParentUuid(pImage->pvBackendData, &parentUuid);
     3392        if (RT_SUCCESS(rc2) && !RTUuidIsNull(&parentUuid))
     3393            uImageFlags |= VD_IMAGE_FLAGS_DIFF;
     3394
    33853395        pImage->uImageFlags = uImageFlags;
    33863396
     
    57665776        AssertPtrBreakStmt(pImage, rc = VERR_VD_IMAGE_NOT_FOUND);
    57675777
    5768         *puImageFlags = pImage->Backend->pfnGetImageFlags(pImage->pvBackendData);
     5778        *puImageFlags = pImage->uImageFlags;
    57695779    } while (0);
    57705780
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