VirtualBox

Changeset 2833 in vbox


Ignore:
Timestamp:
May 24, 2007 9:58:44 AM (18 years ago)
Author:
vboxsync
Message:

New open flag for just getting the image information, suppressing
base/diff image consistency check.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxHDD-new.h

    r2741 r2833  
    153153 * formats. It is silently ignored otherwise. */
    154154#define VD_OPEN_FLAGS_HONOR_SAME    RT_BIT(2)
     155/** Do not perform the base/diff image check on open. This internally implies
     156 * opening the image as readonly. Images opened with this flag should only be
     157 * used for querying information, and nothing else. */
     158#define VD_OPEN_FLAGS_INFO          RT_BIT(3)
    155159/** Mask of valid flags. */
    156 #define VD_OPEN_FLAGS_MASK          (VD_OPEN_FLAGS_NORMAL | VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_HONOR_ZEROES | VD_OPEN_FLAGS_HONOR_SAME)
     160#define VD_OPEN_FLAGS_MASK          (VD_OPEN_FLAGS_NORMAL | VD_OPEN_FLAGS_READONLY | VD_OPEN_FLAGS_HONOR_ZEROES | VD_OPEN_FLAGS_HONOR_SAME | VD_OPEN_FLAGS_INFO)
    157161/** @}*/
    158162
  • trunk/src/VBox/Devices/Storage/VBoxHDD-new.cpp

    r2742 r2833  
    578578    }
    579579
     580    /* Force readonly for images without base/diff consistency checking. */
     581    if (uOpenFlags & VD_OPEN_FLAGS_INFO)
     582        uOpenFlags |= VD_OPEN_FLAGS_READONLY;
     583
    580584    /* Set up image descriptor. */
    581585    PVDIMAGE pImage = (PVDIMAGE)RTMemAllocZ(sizeof(VDIMAGE));
     
    622626         * or normal, all others must be normal images. */
    623627        if (    VBOX_SUCCESS(rc)
     628            &&  !(uOpenFlags & VD_OPEN_FLAGS_INFO)
    624629            &&  pDisk->cImages != 0
    625630            &&  enmImageType != VD_IMAGE_TYPE_NORMAL)
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