Changeset 2359 in vbox
- Timestamp:
- Apr 26, 2007 5:06:59 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 20752
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r2358 r2359 1354 1354 if (VBOX_FAILURE(rc)) 1355 1355 { 1356 rc = vmdkError(p Extent->pImage, rc, RT_SRC_POS, N_("VMDK: error reading the magic number from file '%s'"), pszFilename);1356 rc = vmdkError(pImage, rc, RT_SRC_POS, N_("VMDK: error reading the magic number from file '%s'"), pszFilename); 1357 1357 goto out; 1358 1358 } … … 1929 1929 static int vmdkOpen(const char *pszFilename, unsigned uOpenFlags, PFNVDERROR pfnError, void *pvErrorUser, void **ppvBackendData) 1930 1930 { 1931 int rc ;1931 int rc = VINF_SUCCESS; 1932 1932 PVMDKIMAGE pImage; 1933 1933 … … 2018 2018 case VMDKETYPE_ESX_SPARSE: 2019 2019 #endif /* VBOX_WITH_VMDK_ESX */ 2020 /* Clip read range to at most the rest of the grain. */2021 cbRead = RT_MIN(cbRead, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain)));2022 2020 rc = vmdkGetSector(pImage->pGTCache, pExtent, uSectorInExtent, 2023 2021 &uSectorOffset); 2024 2022 if (VBOX_FAILURE(rc)) 2025 2023 goto out; 2024 /* Clip read range to at most the rest of the grain. */ 2025 cbRead = RT_MIN(cbRead, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain))); 2026 2026 if (uSectorOffset == 0) 2027 2027 rc = VINF_VDI_BLOCK_FREE; … … 2088 2088 case VMDKETYPE_ESX_SPARSE: 2089 2089 #endif /* VBOX_WITH_VMDK_ESX */ 2090 /* Clip write range to at most the rest of the grain. */2091 cbWrite = RT_MIN(cbWrite, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain)));2092 2090 rc = vmdkGetSector(pImage->pGTCache, pExtent, uSectorInExtent, 2093 2091 &uSectorOffset); 2094 2092 if (VBOX_FAILURE(rc)) 2095 2093 goto out; 2094 /* Clip write range to at most the rest of the grain. */ 2095 cbWrite = RT_MIN(cbWrite, VMDK_SECTOR2BYTE(pExtent->cSectorsPerGrain - (uSectorOffset % pExtent->cSectorsPerGrain))); 2096 2096 if (uSectorOffset == 0) 2097 2097 {
Note:
See TracChangeset
for help on using the changeset viewer.