VirtualBox

Changeset 10752 in vbox for trunk


Ignore:
Timestamp:
Jul 18, 2008 5:08:47 PM (16 years ago)
Author:
vboxsync
Message:

Modify HCustomImage to accept images which do not have a UUID

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HardDiskImpl.cpp

    r10715 r10752  
    49354935
    49364936        vrc = VDGetUuid (mContainer, 0, id.ptr());
    4937         if (VBOX_FAILURE (vrc))
     4937        if (VBOX_FAILURE (vrc) && vrc != VERR_NOT_SUPPORTED)
    49384938            break;
    4939         vrc = VDGetParentUuid (mContainer, 0, parentId.ptr());
    4940         if (VBOX_FAILURE (vrc))
    4941             break;
    49424939
    49434940        if (!mId.isEmpty())
    49444941        {
    49454942            /* check that the actual UUID of the image matches the stored UUID */
    4946             if (mId != id)
     4943            if (VBOX_SUCCESS(vrc) && (mId != id))
    49474944            {
    49484945                errMsg = Utf8StrFmt (
     
    49554952        else
    49564953        {
    4957             /* assgn an UUID read from the image file */
    4958             mId = id;
    4959         }
     4954            /* assign an UUID read from the image file */
     4955            if (VBOX_SUCCESS(vrc))
     4956                mId = id;
     4957            else
     4958            {
     4959                /* Create a UUID on our own. */
     4960                vrc = RTUuidCreate(mId.ptr());
     4961                if (VBOX_FAILURE(vrc))
     4962                    break;
     4963            }
     4964        }
     4965
     4966
     4967        vrc = VDGetParentUuid (mContainer, 0, parentId.ptr());
     4968        if (VBOX_FAILURE (vrc))
     4969            break;
    49604970
    49614971        if (mParent)
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