VirtualBox

Changeset 96842 in vbox for trunk/src/VBox/Storage/VMDK.cpp


Ignore:
Timestamp:
Sep 23, 2022 10:08:09 AM (2 years ago)
Author:
vboxsync
Message:

Storage: VMDK.cpp: scm fix.

File:
1 edited

Legend:

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

    r96837 r96842  
    28202820}
    28212821/**
    2822  * Internal: allocate and describes an additional, file-backed extent 
     2822 * Internal: allocate and describes an additional, file-backed extent
    28232823 * for the given size. Preserves original extents.
    28242824 */
     
    28462846        pExtent->enmAccess = VMDKACCESS_READWRITE;
    28472847        pExtent->uSectorOffset = 0;
    2848        
     2848
    28492849        char *pszBasenameSubstr = RTPathFilename(pImage->pszFilename);
    28502850        AssertPtr(pszBasenameSubstr);
     
    75207520        return VERR_BUFFER_OVERFLOW;
    75217521    }
    7522    
     7522
    75237523    char * szNewExtentSectors = (char *)RTMemAlloc(UINT64_MAX_BUFF_SIZE);
    75247524    if (!szNewExtentSectors)
     
    75637563{
    75647564    RT_NOREF5(uPercentStart, uPercentSpan, pVDIfsDisk, pVDIfsImage, pVDIfsOperation);
    7565    
     7565
    75667566    // Establish variables and objects needed
    75677567    int rc = VINF_SUCCESS;
     
    75947594    else if (cbSize > pImage->cbSize)
    75957595    {
    7596         /** 
     7596        /**
    75977597         * monolithicFlat. FIXED flag and not split up into 2 GB parts.
    75987598         */
     
    76147614        }
    76157615
    7616         /** 
    7617          * twoGbMaxExtentFlat. FIXED flag and SPLIT into 2 GB parts. 
     7616        /**
     7617         * twoGbMaxExtentFlat. FIXED flag and SPLIT into 2 GB parts.
    76187618         */
    76197619        if ((uImageFlags & VD_IMAGE_FLAGS_FIXED) && (uImageFlags & VD_VMDK_IMAGE_FLAGS_SPLIT_2G))
     
    76347634                if (RT_FAILURE(rc))
    76357635                    return vdIfError(pImage->pIfError, rc, RT_SRC_POS, N_("VMDK: could not set size of new file '%s'"), pExtent->pszFullname);
    7636            
     7636
    76377637                rc = vmdkRepaceExtentSize(pImage, pImage->Descriptor.uFirstExtent + cExtents - 1,
    76387638                                          pExtent->cNominalSectors, cSectorsNeeded + cLastExtentRemSectors);
     
    76527652
    76537653                    cSectorsNeeded = cSectorsNeeded - VMDK_BYTE2SECTOR(VMDK_2G_SPLIT_SIZE) + cLastExtentRemSectors;
    7654                    
     7654
    76557655                    rc = vmdkRepaceExtentSize(pImage, pImage->Descriptor.uFirstExtent + cExtents - 1,
    76567656                                              pExtent->cNominalSectors, VMDK_BYTE2SECTOR(VMDK_2G_SPLIT_SIZE));
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