VirtualBox

Changeset 46520 in vbox for trunk/src/VBox/Storage/testcase


Ignore:
Timestamp:
Jun 13, 2013 10:35:56 AM (11 years ago)
Author:
vboxsync
Message:

vbox-img: Set proper open flags to make setting the UUID on diff images possible without opening the parent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/testcase/vbox-img.cpp

    r44528 r46520  
    262262        return errorRuntime("Cannot create the virtual disk container: %Rrc\n", rc);
    263263
    264 
    265     rc = VDOpen(pVD, pszFormat, pszFilename, VD_OPEN_FLAGS_NORMAL, NULL);
     264    /* Open in info mode to be able to open diff images without their parent. */
     265    rc = VDOpen(pVD, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL);
    266266    if (RT_FAILURE(rc))
    267267        return errorRuntime("Cannot open the virtual disk image \"%s\": %Rrc\n",
     
    956956
    957957    /* Open the image */
    958     rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL);
     958    rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO | VD_OPEN_FLAGS_READONLY, NULL);
    959959    if (RT_FAILURE(rc))
    960960        return errorRuntime("Error while opening the image: %Rrc\n", rc);
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