VirtualBox

Changeset 76154 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Dec 11, 2018 9:01:30 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
127399
Message:

Main: bugref:9324: Added new error for "medium shrink is not allowed"

Location:
trunk/src/VBox/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VDI.cpp

    r69500 r76154  
    25272527    /** @todo implement making the image smaller, it is the responsibility of
    25282528     * the user to know what he's doing. */
    2529     if (   cbSize < getImageDiskSize(&pImage->Header)
    2530         || GET_MAJOR_HEADER_VERSION(&pImage->Header) == 0
    2531         || pImage->uImageFlags & VD_IMAGE_FLAGS_FIXED)
     2529    if (cbSize < getImageDiskSize(&pImage->Header))
     2530        rc = VERR_VD_SHRINK_NOT_SUPPORTED;
     2531    else if (   GET_MAJOR_HEADER_VERSION(&pImage->Header) == 0
     2532             || pImage->uImageFlags & VD_IMAGE_FLAGS_FIXED)
    25322533        rc = VERR_NOT_SUPPORTED;
    25332534    else if (cbSize > getImageDiskSize(&pImage->Header))
  • trunk/src/VBox/Storage/VHD.cpp

    r73097 r76154  
    25462546
    25472547    /* Making the image smaller is not supported at the moment. */
    2548     if (   cbSize < pImage->cbSize
    2549         || pImage->uImageFlags & VD_IMAGE_FLAGS_FIXED)
     2548    if (cbSize < pImage->cbSize)
     2549        rc = VERR_VD_SHRINK_NOT_SUPPORTED;
     2550    else if (pImage->uImageFlags & VD_IMAGE_FLAGS_FIXED)
    25502551        rc = VERR_NOT_SUPPORTED;
    25512552    else if (cbSize > pImage->cbSize)
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