Changeset 69609 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Nov 7, 2017 6:59:38 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/dvm.h
r69111 r69609 31 31 #include <iprt/err.h> 32 32 #include <iprt/assert.h> 33 #include <iprt/vfs.h> 33 34 #include "internal/magics.h" 34 35 … … 55 56 { 56 57 /** Size of the disk in bytes. */ 57 uint64_t cbDisk;58 uint64_t cbDisk; 58 59 /** Sector size. */ 59 uint64_t cbSector; 60 /** Read callback */ 61 PFNDVMREAD pfnRead; 62 /** Write callback. */ 63 PFNDVMWRITE pfnWrite; 64 /** Opaque user data. */ 65 void *pvUser; 60 uint64_t cbSector; 61 /** The VFS file handle if backed by such. */ 62 RTVFSFILE hVfsFile; 66 63 } RTDVMDISK; 67 64 /** Pointer to a disk descriptor. */ … … 294 291 AssertReturn(off + cbRead <= pDisk->cbDisk, VERR_INVALID_PARAMETER); 295 292 296 return pDisk->pfnRead(pDisk->pvUser, off, pvBuf, cbRead);293 return RTVfsFileReadAt(pDisk->hVfsFile, off, pvBuf, cbRead, NULL /*pcbRead*/); 297 294 } 298 295 … … 313 310 AssertReturn(off + cbWrite <= pDisk->cbDisk, VERR_INVALID_PARAMETER); 314 311 315 return pDisk->pfnWrite(pDisk->pvUser, off, pvBuf, cbWrite);312 return RTVfsFileWriteAt(pDisk->hVfsFile, off, pvBuf, cbWrite, NULL /*pcbWritten*/); 316 313 } 317 314
Note:
See TracChangeset
for help on using the changeset viewer.