VirtualBox

Changeset 8229 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Apr 21, 2008 2:04:57 PM (17 years ago)
Author:
vboxsync
Message:

Opening a monolithic sparse VMDK was lacking the initialization of the per-extent fullname field. Also did some renaming for improving identifier consistency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r8155 r8229  
    22222222        pExtent->File = File;
    22232223        pImage->File = NIL_RTFILE;
     2224        pExtent->pszFullname = RTStrDup(pImage->pszFilename);
     2225        if (!pExtent->pszFullname)
     2226        {
     2227            rc = VERR_NO_MEMORY;
     2228            goto out;
     2229        }
    22242230        rc = vmdkReadMetaSparseExtent(pImage, pExtent);
    22252231        if (VBOX_FAILURE(rc))
     
    27862792        char *pszBasedirectory = RTStrDup(pImage->pszFilename);
    27872793        RTPathStripFilename(pszBasedirectory);
    2788         char *pszFN;
    2789         rc = RTStrAPrintf(&pszFN, "%s%c%s", pszBasedirectory, RTPATH_SLASH,
    2790                           pExtent->pszBasename);
     2794        char *pszFullname;
     2795        rc = RTStrAPrintf(&pszFullname, "%s%c%s", pszBasedirectory,
     2796                          RTPATH_SLASH, pExtent->pszBasename);
    27912797        RTStrFree(pszBasedirectory);
    27922798        if (VBOX_FAILURE(rc))
    27932799            return rc;
    2794         pExtent->pszFullname = pszFN;
     2800        pExtent->pszFullname = pszFullname;
    27952801
    27962802        /* Create file for extent. */
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