- Timestamp:
- Jul 7, 2018 4:43:10 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123503
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDisk.cpp
r72949 r72951 2051 2051 ComPtr<IMedium> ptrMedium; 2052 2052 HRESULT hrc = openMedium(pHandler, pCommonOpts->pszFilenameOrUuid, pCommonOpts->enmDeviceType, 2053 fWritable ? AccessMode_ReadWrite : AccessMode_ReadOnly,2053 (AccessMode_T)(fWritable ? AccessMode_ReadWrite : AccessMode_ReadOnly), 2054 2054 ptrMedium, false /* fForceNewUuidOnOpen */, false /* fSilent */); 2055 2055 if (SUCCEEDED(hrc)) 2056 { 2056 2057 CHECK_ERROR2I_STMT(ptrMedium, OpenForIO(fWritable, bstrPassword.raw(), rPtrMediumIO.asOutParam()), hrc = hrcCheck); 2057 2058 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 } 2068 2070 } 2069 2071
Note:
See TracChangeset
for help on using the changeset viewer.