VirtualBox

Changeset 56379 in vbox


Ignore:
Timestamp:
Jun 12, 2015 7:54:38 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
100977
Message:

Storage/VMDK: small "just in case" code adjustments, shouldn't be possible to cause harm

File:
1 edited

Legend:

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

    r54430 r56379  
    28952895    {
    28962896        /* Do not delete raw extents, these have full and base names equal. */
    2897         rc =vmdkFileClose(pImage, &pExtent->pFile,
    2898                              fDelete
    2899                           && pExtent->pszFullname
    2900                           && strcmp(pExtent->pszFullname, pExtent->pszBasename));
     2897        rc = vmdkFileClose(pImage, &pExtent->pFile,
     2898                              fDelete
     2899                           && pExtent->pszFullname
     2900                           && pExtent->pszBasename
     2901                           && strcmp(pExtent->pszFullname, pExtent->pszBasename));
    29012902    }
    29022903    if (pExtent->pszBasename)
     
    63036304    AssertPtr(pImage);
    63046305
    6305     if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY)
    6306     {
    6307         rc = VERR_VD_IMAGE_READ_ONLY;
    6308         goto out;
    6309     }
    6310     if (pImage->uOpenFlags & VD_VMDK_IMAGE_FLAGS_STREAM_OPTIMIZED)
    6311     {
    6312         rc = VERR_NOT_SUPPORTED;
    6313         goto out;
    6314     }
    6315 
    63166306    if (pImage)
     6307    {
     6308        if (pImage->uOpenFlags & VD_OPEN_FLAGS_READONLY)
     6309        {
     6310            rc = VERR_VD_IMAGE_READ_ONLY;
     6311            goto out;
     6312        }
     6313        if (pImage->uOpenFlags & VD_VMDK_IMAGE_FLAGS_STREAM_OPTIMIZED)
     6314        {
     6315            rc = VERR_NOT_SUPPORTED;
     6316            goto out;
     6317        }
     6318
    63176319        rc = vmdkSetImageComment(pImage, pszComment);
     6320    }
    63186321    else
    63196322        rc = VERR_VD_NOT_OPENED;
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