VirtualBox

Changeset 72951 in vbox for trunk/src


Ignore:
Timestamp:
Jul 7, 2018 4:43:10 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123503
Message:

VBoxManage: mediumio build fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp

    r72949 r72951  
    20512051    ComPtr<IMedium> ptrMedium;
    20522052    HRESULT hrc = openMedium(pHandler, pCommonOpts->pszFilenameOrUuid, pCommonOpts->enmDeviceType,
    2053                              fWritable ? AccessMode_ReadWrite : AccessMode_ReadOnly,
     2053                             (AccessMode_T)(fWritable ? AccessMode_ReadWrite : AccessMode_ReadOnly),
    20542054                             ptrMedium, false /* fForceNewUuidOnOpen */, false /* fSilent */);
    20552055    if (SUCCEEDED(hrc))
     2056    {
    20562057        CHECK_ERROR2I_STMT(ptrMedium, OpenForIO(fWritable, bstrPassword.raw(), rPtrMediumIO.asOutParam()), hrc = hrcCheck);
    20572058
    2058     /*
    2059      * If the size is requested get it after we've opened it.
    2060      */
    2061     if (pcbMedium && SUCCEEDED(hrc))
    2062     {
    2063         LONG64 cbLogical = 0;
    2064         CHECK_ERROR2I_STMT(ptrMedium, COMGETTER(LogicalSize)(&cbLogical), hrc = hrcCheck);
    2065         *pcbMedium = cbLogical;
    2066         if (!SUCCEEDED(hrc))
    2067             rPtrMediumIO.setNull();
     2059        /*
     2060         * If the size is requested get it after we've opened it.
     2061         */
     2062        if (pcbMedium && SUCCEEDED(hrc))
     2063        {
     2064            LONG64 cbLogical = 0;
     2065            CHECK_ERROR2I_STMT(ptrMedium, COMGETTER(LogicalSize)(&cbLogical), hrc = hrcCheck);
     2066            *pcbMedium = cbLogical;
     2067            if (!SUCCEEDED(hrc))
     2068                rPtrMediumIO.setNull();
     2069        }
    20682070    }
    20692071
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