Changeset 44252 in vbox for trunk/src/VBox/Storage/DMG.cpp
- Timestamp:
- Jan 8, 2013 1:23:54 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/DMG.cpp
r44233 r44252 1660 1660 1661 1661 /** @copydoc VBOXHDDBACKEND::pfnRead */ 1662 static int dmgRead(void *pBackendData, uint64_t uOffset, void *pvBuf, 1663 size_t cbToRead, size_t *pcbActuallyRead) 1664 { 1665 LogFlowFunc(("pBackendData=%#p uOffset=%llu pvBuf=%#p cbToRead=%zu pcbActuallyRead=%#p\n", pBackendData, uOffset, pvBuf, cbToRead, pcbActuallyRead)); 1662 static int dmgRead(void *pBackendData, uint64_t uOffset, size_t cbToRead, 1663 PVDIOCTX pIoCtx, size_t *pcbActuallyRead) 1664 { 1665 LogFlowFunc(("pBackendData=%#p uOffset=%llu pIoCtx=%#p cbToRead=%zu pcbActuallyRead=%#p\n", 1666 pBackendData, uOffset, pIoCtx, cbToRead, pcbActuallyRead)); 1666 1667 PDMGIMAGE pThis = (PDMGIMAGE)pBackendData; 1667 1668 PDMGEXTENT pExtent = NULL; … … 1692 1693 case DMGEXTENTTYPE_RAW: 1693 1694 { 1694 rc = vdIfIoIntFileRead Sync(pThis->pIfIo, pThis->pStorage,1695 rc = vdIfIoIntFileReadUser(pThis->pIfIo, pThis->pStorage, 1695 1696 pExtent->offFileStart + DMG_BLOCK2BYTE(uExtentRel), 1696 p vBuf, cbToRead);1697 pIoCtx, cbToRead); 1697 1698 break; 1698 1699 } 1699 1700 case DMGEXTENTTYPE_ZERO: 1700 1701 { 1701 memset(pvBuf, 0, cbToRead);1702 vdIfIoIntIoCtxSet(pThis->pIfIo, pIoCtx, 0, cbToRead); 1702 1703 break; 1703 1704 } … … 1729 1730 1730 1731 if (RT_SUCCESS(rc)) 1731 memcpy(pvBuf, (uint8_t *)pThis->pvDecompExtent + DMG_BLOCK2BYTE(uExtentRel), cbToRead); 1732 vdIfIoIntIoCtxCopyTo(pThis->pIfIo, pIoCtx, 1733 (uint8_t *)pThis->pvDecompExtent + DMG_BLOCK2BYTE(uExtentRel), 1734 cbToRead); 1732 1735 break; 1733 1736 } … … 1748 1751 1749 1752 /** @copydoc VBOXHDDBACKEND::pfnWrite */ 1750 static int dmgWrite(void *pBackendData, uint64_t uOffset, const void *pvBuf,1751 size_t cbToWrite, size_t *pcbWriteProcess,1752 size_t *pcbP reRead, size_t *pcbPostRead, unsigned fWrite)1753 { 1754 LogFlowFunc(("pBackendData=%#p uOffset=%llu p vBuf=%#p cbToWrite=%zu pcbWriteProcess=%#p pcbPreRead=%#p pcbPostRead=%#p\n",1755 pBackendData, uOffset, p vBuf, cbToWrite, pcbWriteProcess, pcbPreRead, pcbPostRead));1753 static int dmgWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite, 1754 PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead, 1755 size_t *pcbPostRead, unsigned fWrite) 1756 { 1757 LogFlowFunc(("pBackendData=%#p uOffset=%llu pIoCtx=%#p cbToWrite=%zu pcbWriteProcess=%#p pcbPreRead=%#p pcbPostRead=%#p\n", 1758 pBackendData, uOffset, pIoCtx, cbToWrite, pcbWriteProcess, pcbPreRead, pcbPostRead)); 1756 1759 PDMGIMAGE pThis = (PDMGIMAGE)pBackendData; 1757 1760 int rc = VERR_NOT_IMPLEMENTED; … … 1775 1778 1776 1779 /** @copydoc VBOXHDDBACKEND::pfnFlush */ 1777 static int dmgFlush(void *pBackendData )1780 static int dmgFlush(void *pBackendData, PVDIOCTX pIoCtx) 1778 1781 { 1779 1782 LogFlowFunc(("pBackendData=%#p\n", pBackendData)); … … 2269 2272 /* pfnFlush */ 2270 2273 dmgFlush, 2274 /* pfnDiscard */ 2275 NULL, 2271 2276 /* pfnGetVersion */ 2272 2277 dmgGetVersion, … … 2321 2326 /* pfnSetParentFilename */ 2322 2327 NULL, 2323 /* pfnAsyncRead */2324 NULL,2325 /* pfnAsyncWrite */2326 NULL,2327 /* pfnAsyncFlush */2328 NULL,2329 2328 /* pfnComposeLocation */ 2330 2329 genericFileComposeLocation, … … 2335 2334 /* pfnResize */ 2336 2335 NULL, 2337 /* pfnDiscard */2338 NULL,2339 /* pfnAsyncDiscard */2340 NULL,2341 2336 /* pfnRepair */ 2342 2337 NULL
Note:
See TracChangeset
for help on using the changeset viewer.