VirtualBox

Ignore:
Timestamp:
Aug 30, 2019 11:03:01 AM (5 years ago)
Author:
vboxsync
Message:

vboximg-mount: Switch to using a VFS file instead of the VDISK container directly so we can get builtin unaligned access handling without the need to duplicate the code, some memory leak fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ImageMounter/vboximg-mount/vboximgMedia.cpp

    r76553 r80511  
    203203static void displayMediumInfo(MEDIUMINFO *pInfo, int nestLevel, bool fLast)
    204204{
    205 
    206     char *cbScaled = vboximgScaledSize(pInfo->cbSize);
     205    char *pszSzScaled = vboximgScaledSize(pInfo->cbSize);
    207206    int cPad = nestLevel * 2;
    208207    if (g_vboximgOpts.fWide && !g_vboximgOpts.fVerbose)
     
    211210            !fLast ? (pInfo->fSnapshot ? " | " : " +-") : (pInfo->fSnapshot ? "   " : " +-"),
    212211            VM_MAX_NAME, pInfo->fSnapshot ? "+- <snapshot>" : pInfo->pszName,
    213             cbScaled,
     212            pszSzScaled,
    214213            pInfo->pszFormat,
    215214            pInfo->pszState,
    216215            cPad, "", pInfo->pszUuid);
    217         RTMemFree(cbScaled);
    218216    }
    219217    else
     
    229227                RTPrintf("    Path:    %s\n", pInfo->pszPath);
    230228                RTPrintf("    Format:  %s\n", pInfo->pszFormat);
    231                 RTPrintf("    Size:    %s\n", cbScaled);
     229                RTPrintf("    Size:    %s\n", pszSzScaled);
    232230                RTPrintf("    State:   %s\n", pInfo->pszState);
    233231                RTPrintf("    Type:    %s\n", pInfo->pszType);
     
    243241                RTPrintf("         Desc:     %s\n", pInfo->pszDescription);
    244242            }
    245             RTPrintf("         Size:     %s\n", cbScaled);
     243            RTPrintf("         Size:     %s\n", pszSzScaled);
    246244            if (g_vboximgOpts.fVerbose)
    247245                RTPrintf("         Path:     %s\n", pInfo->pszPath);
     
    249247        }
    250248    }
     249    RTMemFree(pszSzScaled);
    251250}
    252251
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