Changeset 64272 in vbox
- Timestamp:
- Oct 14, 2016 8:25:05 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111285
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vd-cache-backend.h
r63912 r64272 125 125 * @param pBackendData Opaque state data for this image. 126 126 * @param uOffset The offset of the virtual disk to read from. 127 * @param cb ReadHow many bytes to read.127 * @param cbToRead How many bytes to read. 128 128 * @param pIoCtx I/O context associated with this request. 129 129 * @param pcbActuallyRead Pointer to returned number of bytes read. 130 130 */ 131 DECLR3CALLBACKMEMBER(int, pfnRead, (void *pBackendData, uint64_t uOffset, size_t cb Read,131 DECLR3CALLBACKMEMBER(int, pfnRead, (void *pBackendData, uint64_t uOffset, size_t cbToRead, 132 132 PVDIOCTX pIoCtx, size_t *pcbActuallyRead)); 133 133 … … 138 138 * @param pBackendData Opaque state data for this image. 139 139 * @param uOffset The offset of the virtual disk to write to. 140 * @param cb WriteHow many bytes to write.140 * @param cbToWrite How many bytes to write. 141 141 * @param pIoCtx I/O context associated with this request. 142 142 * @param pcbWriteProcess Pointer to returned number of bytes that could … … 147 147 * amount of (previously read) padding data. 148 148 */ 149 DECLR3CALLBACKMEMBER(int, pfnWrite, (void *pBackendData, uint64_t uOffset, size_t cb Write,149 DECLR3CALLBACKMEMBER(int, pfnWrite, (void *pBackendData, uint64_t uOffset, size_t cbToWrite, 150 150 PVDIOCTX pIoCtx, size_t *pcbWriteProcess)); 151 151 -
trunk/include/VBox/vd-ifs.h
r63912 r64272 357 357 * VDAsyncRead or VDAsyncWrite) in pvCompletion 358 358 * if this is NULL. 359 * @param pp StorageWhere to store the opaque storage handle.359 * @param ppvStorage Where to store the opaque storage handle. 360 360 */ 361 361 DECLR3CALLBACKMEMBER(int, pfnOpen, (void *pvUser, const char *pszLocation, 362 362 uint32_t fOpen, 363 363 PFNVDCOMPLETED pfnCompleted, 364 void **pp Storage));364 void **ppvStorage)); 365 365 366 366 /** … … 369 369 * @return VBox status code. 370 370 * @param pvUser The opaque data passed on container creation. 371 * @param p StorageThe opaque storage handle to close.372 */ 373 DECLR3CALLBACKMEMBER(int, pfnClose, (void *pvUser, void *p Storage));371 * @param pvStorage The opaque storage handle to close. 372 */ 373 DECLR3CALLBACKMEMBER(int, pfnClose, (void *pvUser, void *pvStorage)); 374 374 375 375 /** … … 419 419 * @return VBox status code. 420 420 * @param pvUser The opaque data passed on container creation. 421 * @param p Storage The opaque storage handle to close.422 * @param pcb SizeWhere to store the size of the storage backend.423 */ 424 DECLR3CALLBACKMEMBER(int, pfnGetSize, (void *pvUser, void *p Storage, uint64_t *pcbSize));421 * @param pvStorage The opaque storage handle to get the size from. 422 * @param pcb Where to store the size of the storage backend. 423 */ 424 DECLR3CALLBACKMEMBER(int, pfnGetSize, (void *pvUser, void *pvStorage, uint64_t *pcb)); 425 425 426 426 /** … … 430 430 * @retval VERR_NOT_SUPPORTED if the backend does not support this operation. 431 431 * @param pvUser The opaque data passed on container creation. 432 * @param p Storage The opaque storage handle to close.433 * @param cb SizeThe new size of the image.432 * @param pvStorage The opaque storage handle to set the size for. 433 * @param cb The new size of the image. 434 434 * 435 435 * @note Depending on the host the underlying storage (backing file, etc.) … … 441 441 * really alloacted. 442 442 */ 443 DECLR3CALLBACKMEMBER(int, pfnSetSize, (void *pvUser, void *p Storage, uint64_t cbSize));443 DECLR3CALLBACKMEMBER(int, pfnSetSize, (void *pvUser, void *pvStorage, uint64_t cb)); 444 444 445 445 /** … … 451 451 * this method. 452 452 * @param pvUser The opaque data passed on container creation. 453 * @param p StorageThe storage handle.453 * @param pvStorage The storage handle. 454 454 * @param cbSize The new size of the image. 455 455 * @param fFlags Flags for controlling the allocation strategy. 456 456 * Reserved for future use, MBZ. 457 457 */ 458 DECLR3CALLBACKMEMBER(int, pfnSetAllocationSize, (void *pvUser, void *p Storage,458 DECLR3CALLBACKMEMBER(int, pfnSetAllocationSize, (void *pvUser, void *pvStorage, 459 459 uint64_t cbSize, uint32_t fFlags)); 460 460 … … 464 464 * @return VBox status code. 465 465 * @param pvUser The opaque data passed on container creation. 466 * @param p StorageThe storage handle to use.467 * @param uOffsetThe offset to start from.468 * @param pvBuf ferPointer to the bits need to be written.469 * @param cb BufferHow many bytes to write.466 * @param pvStorage The storage handle to use. 467 * @param off The offset to start from. 468 * @param pvBuf Pointer to the bits need to be written. 469 * @param cbToWrite How many bytes to write. 470 470 * @param pcbWritten Where to store how many bytes were actually written. 471 471 */ 472 DECLR3CALLBACKMEMBER(int, pfnWriteSync, (void *pvUser, void *p Storage, uint64_t uOffset,473 const void *pvBuf fer, size_t cbBuffer, size_t *pcbWritten));472 DECLR3CALLBACKMEMBER(int, pfnWriteSync, (void *pvUser, void *pvStorage, uint64_t off, 473 const void *pvBuf, size_t cbToWrite, size_t *pcbWritten)); 474 474 475 475 /** … … 478 478 * @return VBox status code. 479 479 * @param pvUser The opaque data passed on container creation. 480 * @param p StorageThe storage handle to use.481 * @param uOffsetThe offset to start from.482 * @param pvBuf ferWhere to store the read bits.483 * @param cb BufferHow many bytes to read.480 * @param pvStorage The storage handle to use. 481 * @param off The offset to start from. 482 * @param pvBuf Where to store the read bits. 483 * @param cbToRead How many bytes to read. 484 484 * @param pcbRead Where to store how many bytes were actually read. 485 485 */ 486 DECLR3CALLBACKMEMBER(int, pfnReadSync, (void *pvUser, void *p Storage, uint64_t uOffset,487 void *pvBuf fer, size_t cbBuffer, size_t *pcbRead));486 DECLR3CALLBACKMEMBER(int, pfnReadSync, (void *pvUser, void *pvStorage, uint64_t off, 487 void *pvBuf, size_t cbToRead, size_t *pcbRead)); 488 488 489 489 /** … … 492 492 * @return VBox status code. 493 493 * @param pvUser The opaque data passed on container creation. 494 * @param p StorageThe storage handle to flush.495 */ 496 DECLR3CALLBACKMEMBER(int, pfnFlushSync, (void *pvUser, void *p Storage));494 * @param pvStorage The storage handle to flush. 495 */ 496 DECLR3CALLBACKMEMBER(int, pfnFlushSync, (void *pvUser, void *pvStorage)); 497 497 498 498 /** … … 501 501 * @return VBox status code. 502 502 * @param pvUser The opaque user data passed on container creation. 503 * @param p StorageThe storage handle.503 * @param pvStorage The storage handle. 504 504 * @param uOffset The offset to start reading from. 505 505 * @param paSegments Scatter gather list to store the data in. … … 509 509 * @param ppTask Where to store the opaque task handle. 510 510 */ 511 DECLR3CALLBACKMEMBER(int, pfnReadAsync, (void *pvUser, void *p Storage, uint64_t uOffset,511 DECLR3CALLBACKMEMBER(int, pfnReadAsync, (void *pvUser, void *pvStorage, uint64_t uOffset, 512 512 PCRTSGSEG paSegments, size_t cSegments, 513 513 size_t cbRead, void *pvCompletion, … … 519 519 * @return VBox status code. 520 520 * @param pvUser The opaque user data passed on conatiner creation. 521 * @param p StorageThe storage handle.521 * @param pvStorage The storage handle. 522 522 * @param uOffset The offset to start writing to. 523 523 * @param paSegments Scatter gather list of the data to write … … 527 527 * @param ppTask Where to store the opaque task handle. 528 528 */ 529 DECLR3CALLBACKMEMBER(int, pfnWriteAsync, (void *pvUser, void *p Storage, uint64_t uOffset,529 DECLR3CALLBACKMEMBER(int, pfnWriteAsync, (void *pvUser, void *pvStorage, uint64_t uOffset, 530 530 PCRTSGSEG paSegments, size_t cSegments, 531 531 size_t cbWrite, void *pvCompletion, … … 537 537 * @return VBox status code. 538 538 * @param pvUser The opaque data passed on container creation. 539 * @param p StorageThe storage handle to flush.539 * @param pvStorage The storage handle to flush. 540 540 * @param pvCompletion The opaque user data which is returned upon completion. 541 541 * @param ppTask Where to store the opaque task handle. 542 542 */ 543 DECLR3CALLBACKMEMBER(int, pfnFlushAsync, (void *pvUser, void *p Storage,543 DECLR3CALLBACKMEMBER(int, pfnFlushAsync, (void *pvUser, void *pvStorage, 544 544 void *pvCompletion, void **ppTask)); 545 545 -
trunk/include/VBox/vd-image-backend.h
r63912 r64272 177 177 * @param pBackendData Opaque state data for this image. 178 178 * @param uOffset The offset of the virtual disk to read from. 179 * @param cb ReadHow many bytes to read.179 * @param cbToRead How many bytes to read. 180 180 * @param pIoCtx I/O context associated with this request. 181 181 * @param pcbActuallyRead Pointer to returned number of bytes read. 182 182 */ 183 DECLR3CALLBACKMEMBER(int, pfnRead, (void *pBackendData, uint64_t uOffset, size_t cb Read,183 DECLR3CALLBACKMEMBER(int, pfnRead, (void *pBackendData, uint64_t uOffset, size_t cbToRead, 184 184 PVDIOCTX pIoCtx, size_t *pcbActuallyRead)); 185 185 … … 190 190 * @param pBackendData Opaque state data for this image. 191 191 * @param uOffset The offset of the virtual disk to write to. 192 * @param cb WriteHow many bytes to write.192 * @param cbToWrite How many bytes to write. 193 193 * @param pIoCtx I/O context associated with this request. 194 194 * @param pcbWriteProcess Pointer to returned number of bytes that could … … 205 205 * of the VD_WRITE_* flags. 206 206 */ 207 DECLR3CALLBACKMEMBER(int, pfnWrite, (void *pBackendData, uint64_t uOffset, size_t cb Write,207 DECLR3CALLBACKMEMBER(int, pfnWrite, (void *pBackendData, uint64_t uOffset, size_t cbToWrite, 208 208 PVDIOCTX pIoCtx, 209 209 size_t *pcbWriteProcess, size_t *pcbPreRead, … … 480 480 * 481 481 * @returns VBox status code. 482 * @param pBackendData Opaque state data for this image.483 * @param p szParentFilename Where to store the path.482 * @param pBackendData Opaque state data for this image. 483 * @param ppszParentFilename Where to store the path. 484 484 */ 485 485 DECLR3CALLBACKMEMBER(int, pfnGetParentFilename, (void *pBackendData, char **ppszParentFilename)); -
trunk/include/VBox/vd.h
r60608 r64272 1002 1002 * 1003 1003 * @return VBox status code. 1004 * @ret urnVERR_VD_NOT_OPENED if no image is opened in HDD container.1005 * @param pDisk Pointer to HDD container. 1006 * @param offOffset of first reading byte from start of disk.1004 * @retval VERR_VD_NOT_OPENED if no image is opened in HDD container. 1005 * @param pDisk Pointer to HDD container. 1006 * @param uOffset Offset of first reading byte from start of disk. 1007 1007 * Must be aligned to a sector boundary. 1008 * @param pvBuf ferPointer to buffer for reading data.1009 * @param cb BufferNumber of bytes to read.1008 * @param pvBuf Pointer to buffer for reading data. 1009 * @param cbRead Number of bytes to read. 1010 1010 * Must be aligned to a sector boundary. 1011 1011 */ 1012 VBOXDDU_DECL(int) VDRead(PVBOXHDD pDisk, uint64_t off, void *pvBuffer, size_t cbBuffer);1012 VBOXDDU_DECL(int) VDRead(PVBOXHDD pDisk, uint64_t uOffset, void *pvBuf, size_t cbRead); 1013 1013 1014 1014 /** … … 1016 1016 * 1017 1017 * @return VBox status code. 1018 * @ret urnVERR_VD_NOT_OPENED if no image is opened in HDD container.1019 * @param pDisk Pointer to HDD container. 1020 * @param offOffset of first writing byte from start of disk.1018 * @retval VERR_VD_NOT_OPENED if no image is opened in HDD container. 1019 * @param pDisk Pointer to HDD container. 1020 * @param uOffset Offset of first writing byte from start of disk. 1021 1021 * Must be aligned to a sector boundary. 1022 * @param pvBuf ferPointer to buffer for writing data.1023 * @param cb BufferNumber of bytes to write.1022 * @param pvBuf Pointer to buffer for writing data. 1023 * @param cbWrite Number of bytes to write. 1024 1024 * Must be aligned to a sector boundary. 1025 1025 */ 1026 VBOXDDU_DECL(int) VDWrite(PVBOXHDD pDisk, uint64_t off, const void *pvBuffer, size_t cbBuffer);1026 VBOXDDU_DECL(int) VDWrite(PVBOXHDD pDisk, uint64_t uOffset, const void *pvBuf, size_t cbWrite); 1027 1027 1028 1028 /** … … 1030 1030 * 1031 1031 * @return VBox status code. 1032 * @ret urnVERR_VD_NOT_OPENED if no image is opened in HDD container.1032 * @retval VERR_VD_NOT_OPENED if no image is opened in HDD container. 1033 1033 * @param pDisk Pointer to HDD container. 1034 1034 */ -
trunk/src/VBox/Storage/DMG.cpp
r63905 r64272 717 717 * Swaps endian. 718 718 * @param pCkSum The structure. 719 * @param u32Kind Kind of the checksum (CRC32, none) 720 * @param cBits Size of the checksum in bits. 719 721 */ 720 722 static void dmgSwapEndianUdifCkSum(PDMGUDIFCKSUM pCkSum, uint32_t u32Kind, uint32_t cBits) … … 947 949 * Finds the end tag. 948 950 * 949 * Does not deal with '<tag attr="1"/>'style tags.951 * Does not deal with @verbatim<tag attr="1"/>@endverbatim style tags. 950 952 * 951 953 * @returns Pointer to the first char in the end tag. NULL if another tag … … 1117 1119 * @param pThis The DMG instance data. 1118 1120 * @param pszXml The XML text to parse, UTF-8. 1119 * @param cch The size of the XML text.1120 1121 */ 1121 1122 static const char *dmgOpenXmlToRsrc(PDMGIMAGE pThis, char const *pszXml) … … 1285 1286 * @param pThis The DMG instance data. 1286 1287 * @param pcszRsrcName Name of the resource to get. 1288 * @param ppcRsrc Where to store the pointer to the resource data on success. 1287 1289 */ 1288 1290 static int dmgGetRsrcData(PDMGIMAGE pThis, const char *pcszRsrcName, -
trunk/src/VBox/Storage/ISCSI.cpp
r63905 r64272 1715 1715 * 1716 1716 * @returns VBox status code. 1717 * @param p Image The iSCSI connection state to be used.1717 * @param pvUser The iSCSI connection state to be used as opaque user data. 1718 1718 */ 1719 1719 static DECLCALLBACK(int) iscsiAttach(void *pvUser) … … 1768 1768 * 1769 1769 * @returns VBox status code. 1770 * @param p Image The iSCSI connection state to be used.1770 * @param pvUser The iSCSI connection state to be used as opaque user data. 1771 1771 */ 1772 1772 static DECLCALLBACK(int) iscsiDetach(void *pvUser) … … 2158 2158 * @returns VBOX status 2159 2159 * @param pImage The iSCSI connection state to be used. 2160 * @param itt The initiator task tag. 2160 2161 * @param paRes Pointer to array of iSCSI response sections. 2161 2162 * @param cnRes Number of valid iSCSI response sections in the array. … … 2967 2968 * @param cbBuf Length of the key-value buffer. 2968 2969 * @param pcbBufCurr Currently used portion of the key-value buffer. 2969 * @param p szKeyPointer to a string containing the key.2970 * @param p szValuePointer to either a string containing the value or to a large binary value.2970 * @param pcszKey Pointer to a string containing the key. 2971 * @param pcszValue Pointer to either a string containing the value or to a large binary value. 2971 2972 * @param cbValue Length of the binary value if applicable. 2972 2973 */ … … 3027 3028 * @param pbBuf Buffer containing key=value pairs. 3028 3029 * @param cbBuf Length of buffer with key=value pairs. 3029 * @param p szKeyPointer to key for which to retrieve the value.3030 * @param pp szValuePointer to value string pointer.3030 * @param pcszKey Pointer to key for which to retrieve the value. 3031 * @param ppcszValue Pointer to value string pointer. 3031 3032 */ 3032 3033 static int iscsiTextGetKeyValue(const uint8_t *pbBuf, size_t cbBuf, const char *pcszKey, const char **ppcszValue) … … 3054 3055 * 3055 3056 * @returns VBOX status 3056 * @param p szValuePointer to a string containing the textual value representation.3057 * @param pcszValue Pointer to a string containing the textual value representation. 3057 3058 * @param pbValue Pointer to the value buffer for the binary value. 3058 3059 * @param pcbValue In: length of value buffer, out: actual length of binary value. -
trunk/src/VBox/Storage/QCOW.cpp
r63905 r64272 775 775 * @returns The start offset of the new cluster in the image. 776 776 * @param pImage The image instance data. 777 * @param cC Lusters Number of clusters to allocate.777 * @param cClusters Number of clusters to allocate. 778 778 */ 779 779 DECLINLINE(uint64_t) qcowClusterAllocate(PQCOWIMAGE pImage, uint32_t cClusters) … … 857 857 * @param offTbl The offset the table should be written to. 858 858 * @param paTbl The table to write. 859 * @param cbTbl Size of the table in bytes. 860 * @param cTblEntries Number entries in the table. 859 861 * @param pfnComplete Callback called when the write completes. 860 862 * @param pvUser Opaque user data to pass in the completion callback. -
trunk/src/VBox/Storage/QED.cpp
r63905 r64272 713 713 * @returns The start offset of the new cluster in the image. 714 714 * @param pImage The image instance data. 715 * @param cC Lusters Number of clusters to allocate.715 * @param cClusters Number of clusters to allocate. 716 716 */ 717 717 DECLINLINE(uint64_t) qedClusterAllocate(PQEDIMAGE pImage, uint32_t cClusters) … … 1653 1653 } 1654 1654 1655 /** @copydoc VDIMAGEBACKEND::pfn Write*/1655 /** @copydoc VDIMAGEBACKEND::pfnRead */ 1656 1656 static DECLCALLBACK(int) qedRead(void *pBackendData, uint64_t uOffset, size_t cbToRead, 1657 1657 PVDIOCTX pIoCtx, size_t *pcbActuallyRead) … … 1692 1692 } 1693 1693 1694 /** @copydoc VDIMAGEBACKEND::pfn Read*/1694 /** @copydoc VDIMAGEBACKEND::pfnWrite */ 1695 1695 static DECLCALLBACK(int) qedWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite, 1696 1696 PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead, -
trunk/src/VBox/Storage/RAW.cpp
r63905 r64272 515 515 516 516 /** @copydoc VDIMAGEBACKEND::pfnRead */ 517 static DECLCALLBACK(int) rawRead(void *pBackendData, uint64_t uOffset, size_t cb Read,517 static DECLCALLBACK(int) rawRead(void *pBackendData, uint64_t uOffset, size_t cbToRead, 518 518 PVDIOCTX pIoCtx, size_t *pcbActuallyRead) 519 519 { … … 530 530 531 531 rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset, 532 pIoCtx, cb Read);532 pIoCtx, cbToRead); 533 533 if (RT_SUCCESS(rc)) 534 534 { 535 *pcbActuallyRead = cb Read;536 pImage->offAccess = uOffset + cb Read;535 *pcbActuallyRead = cbToRead; 536 pImage->offAccess = uOffset + cbToRead; 537 537 } 538 538 … … 541 541 542 542 /** @copydoc VDIMAGEBACKEND::pfnWrite */ 543 static DECLCALLBACK(int) rawWrite(void *pBackendData, uint64_t uOffset, size_t cb Write,543 static DECLCALLBACK(int) rawWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite, 544 544 PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead, 545 545 size_t *pcbPostRead, unsigned fWrite) … … 560 560 561 561 rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage, uOffset, 562 pIoCtx, cb Write, NULL, NULL);562 pIoCtx, cbToWrite, NULL, NULL); 563 563 if (RT_SUCCESS(rc)) 564 564 { 565 *pcbWriteProcess = cb Write;565 *pcbWriteProcess = cbToWrite; 566 566 *pcbPostRead = 0; 567 567 *pcbPreRead = 0; 568 pImage->offAccess = uOffset + cb Write;568 pImage->offAccess = uOffset + cbToWrite; 569 569 } 570 570 -
trunk/src/VBox/Storage/VCICache.cpp
r63905 r64272 447 447 * @param cBlocks The number of blocks the bitmap can manage. 448 448 * @param ppBlkMap Where to store the pointer to the block bitmap. 449 * @param pc bBlkMapWhere to store the size of the block bitmap in blocks449 * @param pcBlkMap Where to store the size of the block bitmap in blocks 450 450 * needed on the disk. 451 451 */ … … 1456 1456 1457 1457 /** @copydoc VDCACHEBACKEND::pfnProbe */ 1458 static DECLCALLBACK(int) vciProbe(const char *pszFilename, PVDINTERFACE pVDIfs Cache,1458 static DECLCALLBACK(int) vciProbe(const char *pszFilename, PVDINTERFACE pVDIfsDisk, 1459 1459 PVDINTERFACE pVDIfsImage) 1460 1460 { 1461 RT_NOREF1(pVDIfs Cache);1461 RT_NOREF1(pVDIfsDisk); 1462 1462 VciHdr Hdr; 1463 1463 PVDIOSTORAGE pStorage = NULL; -
trunk/src/VBox/Storage/VD.cpp
r63905 r64272 3261 3261 * @returns VBox status code. 3262 3262 * @param pDisk VD disk container. 3263 * @param p Discard The discard state.3263 * @param pIoCtx The I/O context associated with this discard operation. 3264 3264 * @param cbDiscardingNew How many bytes should be waiting on success. 3265 3265 * The number of bytes waiting can be less. … … 4502 4502 * @returns VBox status code. 4503 4503 * @param pDisk The disk to unlock. 4504 * @param pIoCtxRc The I/O context to get the status code from, optional. 4504 4505 */ 4505 4506 static int vdDiskUnlock(PVBOXHDD pDisk, PVDIOCTX pIoCtxRc) … … 5974 5975 * @returns VBox status code. 5975 5976 * @param pszBackend The backend name. 5976 * @param pEntr iesPointer to an entry.5977 * @param pEntry Pointer to an entry. 5977 5978 */ 5978 5979 VBOXDDU_DECL(int) VDBackendInfoOne(const char *pszBackend, PVDBACKENDINFO pEntry) … … 6055 6056 * @return VBox status code. 6056 6057 * @param pszFilter The filter name (case insensitive). 6057 * @param pEntr iesPointer to an entry.6058 * @param pEntry Pointer to an entry. 6058 6059 */ 6059 6060 VBOXDDU_DECL(int) VDFilterInfoOne(const char *pszFilter, PVDFILTERINFO pEntry) … … 8178 8179 * read/write behavior in this situation this needs to be extended. 8179 8180 * 8180 * @return 8181 * @ret urnVERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.8181 * @returns VBox status code. 8182 * @retval VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened. 8182 8183 * @param pDiskFrom Pointer to source HDD container. 8183 8184 * @param nImage Image number, counts from 0. 0 is always base image of container. … … 8189 8190 * @param fMoveByRename If true, attempt to perform a move by renaming (if successful the new size is ignored). 8190 8191 * @param cbSize New image size (0 means leave unchanged). 8191 * @param nImage SameFromtodo8192 * @param nImage SameTotodo8192 * @param nImageFromSame todo 8193 * @param nImageToSame todo 8193 8194 * @param uImageFlags Flags specifying special destination image features. 8194 8195 * @param pDstUuid New UUID of the destination image. If NULL, a new UUID is created. … … 9313 9314 * 9314 9315 * @returns VBox status code. 9315 * @ret urnsVERR_VD_NOT_OPENED if no image is opened in HDD container.9316 * @retval VERR_VD_NOT_OPENED if no image is opened in HDD container. 9316 9317 * @param pDisk Pointer to HDD container. 9317 9318 * @param uOffset Offset of first reading byte from start of disk. … … 9381 9382 * 9382 9383 * @returns VBox status code. 9383 * @ret urnsVERR_VD_NOT_OPENED if no image is opened in HDD container.9384 * @retval VERR_VD_NOT_OPENED if no image is opened in HDD container. 9384 9385 * @param pDisk Pointer to HDD container. 9385 9386 * @param uOffset Offset of the first byte being … … 9456 9457 * 9457 9458 * @returns VBox status code. 9458 * @ret urnsVERR_VD_NOT_OPENED if no image is opened in HDD container.9459 * @retval VERR_VD_NOT_OPENED if no image is opened in HDD container. 9459 9460 * @param pDisk Pointer to HDD container. 9460 9461 */ … … 10094 10095 * 10095 10096 * @returns VBox status code. 10096 * @ret urnsVERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened.10097 * @retval VERR_VD_IMAGE_NOT_FOUND if image with specified number was not opened. 10097 10098 * @param pDisk Pointer to the HDD container. 10098 10099 * @param nImage Image number, counts from 0. 0 is always base image of container. 10099 * @param p backendInfo Where to store the backend information.10100 * @param pBackendInfo Where to store the backend information. 10100 10101 */ 10101 10102 VBOXDDU_DECL(int) VDBackendInfoSingle(PVBOXHDD pDisk, unsigned nImage, -
trunk/src/VBox/Storage/VDI.cpp
r63905 r64272 327 327 /** 328 328 * Internal: Init VDI header. Always use latest header version. 329 * @param pHeader Assumes it was initially initialized to all zeros. 329 * 330 * @returns nothing. 331 * @param pHeader Assumes it was initially initialized to all zeros. 332 * @param uImageFlags Flags for this image. 333 * @param pszComment Optional comment to set for the image. 334 * @param cbDisk Size of the disk in bytes. 335 * @param cbBlock Size of one block in the image. 336 * @param cbBlockExtra Extra data for one block private to the image. 337 * @param cbDataAlign The alignment for all data structures. 330 338 */ 331 339 static void vdiInitHeader(PVDIHEADER pHeader, uint32_t uImageFlags, … … 1935 1943 } 1936 1944 1937 /** @copydoc VDIMAGEBACKEND::pfn GetComment */1945 /** @copydoc VDIMAGEBACKEND::pfnSetComment */ 1938 1946 static DECLCALLBACK(int) vdiSetComment(void *pBackendData, const char *pszComment) 1939 1947 { -
trunk/src/VBox/Storage/VDIfVfs2.cpp
r62873 r64272 167 167 /** @interface_method_impl{VDINTERFACEIO,pfnOpen} */ 168 168 static DECLCALLBACK(int) vdIfFromVfs_Open(void *pvUser, const char *pszLocation, uint32_t fOpen, 169 PFNVDCOMPLETED pfnCompleted, void **pp Int)169 PFNVDCOMPLETED pfnCompleted, void **ppvStorage) 170 170 { 171 171 RT_NOREF1(pszLocation); … … 175 175 * Validate input. 176 176 */ 177 AssertPtrReturn(pp Int, VERR_INVALID_POINTER);177 AssertPtrReturn(ppvStorage, VERR_INVALID_POINTER); 178 178 AssertPtrNullReturn(pfnCompleted, VERR_INVALID_PARAMETER); 179 179 … … 192 192 pThis->pvCompletedUser = pvUser; 193 193 194 *pp Int= pThis->hVfsIos;194 *ppvStorage = pThis->hVfsIos; 195 195 return VINF_SUCCESS; 196 196 } -
trunk/src/VBox/Storage/VHD.cpp
r63905 r64272 1448 1448 1449 1449 /** @interface_method_impl{VDIMAGEBACKEND,pfnRead} */ 1450 static DECLCALLBACK(int) vhdRead(void *pBackendData, uint64_t uOffset, size_t cb Read,1450 static DECLCALLBACK(int) vhdRead(void *pBackendData, uint64_t uOffset, size_t cbToRead, 1451 1451 PVDIOCTX pIoCtx, size_t *pcbActuallyRead) 1452 1452 { … … 1454 1454 int rc = VINF_SUCCESS; 1455 1455 1456 LogFlowFunc(("pBackendData=%p uOffset=%#llx pIoCtx=%#p cbRead=%u pcbActuallyRead=%p\n", pBackendData, uOffset, pIoCtx, cbRead, pcbActuallyRead)); 1456 LogFlowFunc(("pBackendData=%p uOffset=%#llx pIoCtx=%#p cbToRead=%u pcbActuallyRead=%p\n", 1457 pBackendData, uOffset, pIoCtx, cbToRead, pcbActuallyRead)); 1457 1458 1458 1459 AssertPtr(pImage); 1459 1460 Assert(uOffset % 512 == 0); 1460 Assert(cb Read % 512 == 0);1461 AssertReturn((VALID_PTR(pIoCtx) && cb Read), VERR_INVALID_PARAMETER);1462 AssertReturn(uOffset + cb Read <= pImage->cbSize, VERR_INVALID_PARAMETER);1461 Assert(cbToRead % 512 == 0); 1462 AssertReturn((VALID_PTR(pIoCtx) && cbToRead), VERR_INVALID_PARAMETER); 1463 AssertReturn(uOffset + cbToRead <= pImage->cbSize, VERR_INVALID_PARAMETER); 1463 1464 1464 1465 /* … … 1480 1481 * Clip read range to remain in this data block. 1481 1482 */ 1482 cb Read = RT_MIN(cbRead, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE)));1483 cbToRead = RT_MIN(cbToRead, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE))); 1483 1484 1484 1485 /* … … 1490 1491 { 1491 1492 uVhdOffset = ((uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry] + pImage->cDataBlockBitmapSectors + cBATEntryIndex) * VHD_SECTOR_SIZE; 1492 LogFlowFunc(("uVhdOffset=%llu cb Read=%u\n", uVhdOffset, cbRead));1493 LogFlowFunc(("uVhdOffset=%llu cbToRead=%u\n", uVhdOffset, cbToRead)); 1493 1494 1494 1495 /* Read in the block's bitmap. */ … … 1514 1515 * must be read from child. 1515 1516 */ 1516 while ( (cSectors < (cb Read / VHD_SECTOR_SIZE))1517 while ( (cSectors < (cbToRead / VHD_SECTOR_SIZE)) 1517 1518 && vhdBlockBitmapSectorContainsData(pImage, cBATEntryIndex)) 1518 1519 { … … 1521 1522 } 1522 1523 1523 cb Read = cSectors * VHD_SECTOR_SIZE;1524 1525 LogFlowFunc(("uVhdOffset=%llu cb Read=%u\n", uVhdOffset, cbRead));1524 cbToRead = cSectors * VHD_SECTOR_SIZE; 1525 1526 LogFlowFunc(("uVhdOffset=%llu cbToRead=%u\n", uVhdOffset, cbToRead)); 1526 1527 rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, 1527 uVhdOffset, pIoCtx, cb Read);1528 uVhdOffset, pIoCtx, cbToRead); 1528 1529 } 1529 1530 else … … 1540 1541 cSectors = 1; 1541 1542 1542 while ( (cSectors < (cb Read / VHD_SECTOR_SIZE))1543 while ( (cSectors < (cbToRead / VHD_SECTOR_SIZE)) 1543 1544 && !vhdBlockBitmapSectorContainsData(pImage, cBATEntryIndex)) 1544 1545 { … … 1547 1548 } 1548 1549 1549 cb Read = cSectors * VHD_SECTOR_SIZE;1550 LogFunc(("Sectors free: uVhdOffset=%llu cb Read=%u\n", uVhdOffset, cbRead));1550 cbToRead = cSectors * VHD_SECTOR_SIZE; 1551 LogFunc(("Sectors free: uVhdOffset=%llu cbToRead=%u\n", uVhdOffset, cbToRead)); 1551 1552 rc = VERR_VD_BLOCK_FREE; 1552 1553 } … … 1557 1558 } 1558 1559 else 1559 rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset, pIoCtx, cb Read);1560 rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset, pIoCtx, cbToRead); 1560 1561 1561 1562 if (pcbActuallyRead) 1562 *pcbActuallyRead = cb Read;1563 *pcbActuallyRead = cbToRead; 1563 1564 1564 1565 LogFlowFunc(("returns rc=%Rrc\n", rc)); … … 1567 1568 1568 1569 /** @interface_method_impl{VDIMAGEBACKEND,pfnWrite} */ 1569 static DECLCALLBACK(int) vhdWrite(void *pBackendData, uint64_t uOffset, size_t cb Write,1570 static DECLCALLBACK(int) vhdWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite, 1570 1571 PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead, 1571 1572 size_t *pcbPostRead, unsigned fWrite) … … 1574 1575 int rc = VINF_SUCCESS; 1575 1576 1576 LogFlowFunc(("pBackendData=%p uOffset=%llu pIoCtx=%#p cb Write=%u pcbWriteProcess=%p pcbPreRead=%p pcbPostRead=%p fWrite=%u\n",1577 pBackendData, uOffset, pIoCtx, cb Write, pcbWriteProcess, pcbPreRead, pcbPostRead, fWrite));1577 LogFlowFunc(("pBackendData=%p uOffset=%llu pIoCtx=%#p cbToWrite=%u pcbWriteProcess=%p pcbPreRead=%p pcbPostRead=%p fWrite=%u\n", 1578 pBackendData, uOffset, pIoCtx, cbToWrite, pcbWriteProcess, pcbPreRead, pcbPostRead, fWrite)); 1578 1579 1579 1580 AssertPtr(pImage); 1580 1581 Assert(!(uOffset % VHD_SECTOR_SIZE)); 1581 Assert(!(cb Write % VHD_SECTOR_SIZE));1582 AssertReturn((VALID_PTR(pIoCtx) && cb Write), VERR_INVALID_PARAMETER);1583 AssertReturn(uOffset + cb Write <= pImage->cbSize, VERR_INVALID_PARAMETER);1582 Assert(!(cbToWrite % VHD_SECTOR_SIZE)); 1583 AssertReturn((VALID_PTR(pIoCtx) && cbToWrite), VERR_INVALID_PARAMETER); 1584 AssertReturn(uOffset + cbToWrite <= pImage->cbSize, VERR_INVALID_PARAMETER); 1584 1585 1585 1586 if (pImage->pBlockAllocationTable) … … 1596 1597 * Clip write range. 1597 1598 */ 1598 cb Write = RT_MIN(cbWrite, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE)));1599 cbToWrite = RT_MIN(cbToWrite, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE))); 1599 1600 1600 1601 /* … … 1611 1612 /* Check if the block allocation should be suppressed. */ 1612 1613 if ( (fWrite & VD_WRITE_NO_ALLOC) 1613 || (cb Write != pImage->cbDataBlock))1614 || (cbToWrite != pImage->cbDataBlock)) 1614 1615 { 1615 1616 *pcbPreRead = cBATEntryIndex * VHD_SECTOR_SIZE; 1616 *pcbPostRead = pImage->cSectorsPerDataBlock * VHD_SECTOR_SIZE - cb Write - *pcbPreRead;1617 *pcbPostRead = pImage->cSectorsPerDataBlock * VHD_SECTOR_SIZE - cbToWrite - *pcbPreRead; 1617 1618 1618 1619 if (pcbWriteProcess) 1619 *pcbWriteProcess = cb Write;1620 *pcbWriteProcess = cbToWrite; 1620 1621 return VERR_VD_BLOCK_FREE; 1621 1622 } … … 1632 1633 1633 1634 /* Set the bits for all sectors having been written. */ 1634 for (uint32_t iSector = 0; iSector < (cb Write / VHD_SECTOR_SIZE); iSector++)1635 for (uint32_t iSector = 0; iSector < (cbToWrite / VHD_SECTOR_SIZE); iSector++) 1635 1636 { 1636 1637 /* No need to check for a changed value because this is an initial write. */ … … 1669 1670 rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage, 1670 1671 pImage->uCurrentEndOfFile + (pImage->cDataBlockBitmapSectors + (cSector % pImage->cSectorsPerDataBlock)) * VHD_SECTOR_SIZE, 1671 pIoCtx, cb Write,1672 pIoCtx, cbToWrite, 1672 1673 vhdAsyncExpansionDataComplete, 1673 1674 pExpand); … … 1752 1753 /* Write data. */ 1753 1754 rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage, 1754 uVhdOffset, pIoCtx, cb Write,1755 uVhdOffset, pIoCtx, cbToWrite, 1755 1756 NULL, NULL); 1756 1757 if (RT_SUCCESS(rc) || rc == VERR_VD_ASYNC_IO_IN_PROGRESS) … … 1759 1760 1760 1761 /* Set the bits for all sectors having been written. */ 1761 for (uint32_t iSector = 0; iSector < (cb Write / VHD_SECTOR_SIZE); iSector++)1762 for (uint32_t iSector = 0; iSector < (cbToWrite / VHD_SECTOR_SIZE); iSector++) 1762 1763 { 1763 1764 fChanged |= vhdBlockBitmapSectorSet(pImage, pImage->pu8Bitmap, cBATEntryIndex); … … 1789 1790 else 1790 1791 rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage, 1791 uOffset, pIoCtx, cb Write, NULL, NULL);1792 uOffset, pIoCtx, cbToWrite, NULL, NULL); 1792 1793 1793 1794 if (pcbWriteProcess) 1794 *pcbWriteProcess = cb Write;1795 *pcbWriteProcess = cbToWrite; 1795 1796 1796 1797 /* Stay on the safe side. Do not run the risk of confusing the higher -
trunk/src/VBox/Storage/VHDX.cpp
r63905 r64272 79 79 /** Version of the log format. */ 80 80 uint16_t u16LogVersion; 81 /** VHDX format version. .*/81 /** VHDX format version. */ 82 82 uint16_t u16Version; 83 83 /** Length of the log region. */ … … 803 803 * @param paBatEntriesConv Where to store the converted BAT. 804 804 * @param paBatEntries The VHDX BAT to convert. 805 * @param cBatEntries Number of entries in the BAT. 805 806 * 806 807 * @note It is safe to use the same pointer for paBatEntriesConv and paBatEntries. -
trunk/src/VBox/Storage/VMDK.cpp
r63905 r64272 1379 1379 1380 1380 /** 1381 * Unquotes the given string returning the result in a separate buffer. 1382 * 1383 * @returns VBox status code. 1384 * @param pImage The VMDK image state. 1385 * @param pszStr The string to unquote. 1381 1386 * @param ppszUnquoted Where to store the return value, use RTMemTmpFree to 1382 1387 * free. 1388 * @param ppszNext Where to store the pointer to any character following 1389 * the quoted value, optional. 1383 1390 */ 1384 1391 static int vmdkStringUnquote(PVMDKIMAGE pImage, const char *pszStr, … … 1590 1597 1591 1598 /** 1599 * Returns the value of the given key as a string allocating the necessary memory. 1600 * 1601 * @returns VBox status code. 1602 * @retval VERR_VD_VMDK_VALUE_NOT_FOUND if the value could not be found. 1603 * @param pImage The VMDK image state. 1604 * @param pDescriptor The descriptor to fetch the value from. 1605 * @param pszKey The key to get the value from. 1592 1606 * @param ppszValue Where to store the return value, use RTMemTmpFree to 1593 1607 * free. … … 1728 1742 1729 1743 /** 1744 * Returns the value of the given key from the DDB as a string allocating 1745 * the necessary memory. 1746 * 1747 * @returns VBox status code. 1748 * @retval VERR_VD_VMDK_VALUE_NOT_FOUND if the value could not be found. 1749 * @param pImage The VMDK image state. 1750 * @param pDescriptor The descriptor to fetch the value from. 1751 * @param pszKey The key to get the value from. 1730 1752 * @param ppszValue Where to store the return value, use RTMemTmpFree to 1731 1753 * free.
Note:
See TracChangeset
for help on using the changeset viewer.