VirtualBox

Changeset 64272 in vbox for trunk/src


Ignore:
Timestamp:
Oct 14, 2016 8:25:05 AM (8 years ago)
Author:
vboxsync
Message:

Storage: Doxygen fixes

Location:
trunk/src/VBox/Storage
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/DMG.cpp

    r63905 r64272  
    717717 * Swaps endian.
    718718 * @param   pCkSum      The structure.
     719 * @param   u32Kind     Kind of the checksum (CRC32, none)
     720 * @param   cBits       Size of the checksum in bits.
    719721 */
    720722static void dmgSwapEndianUdifCkSum(PDMGUDIFCKSUM pCkSum, uint32_t u32Kind, uint32_t cBits)
     
    947949 * Finds the end tag.
    948950 *
    949  * Does not deal with '<tag attr="1"/>' style tags.
     951 * Does not deal with @verbatim<tag attr="1"/>@endverbatim style tags.
    950952 *
    951953 * @returns Pointer to the first char in the end tag. NULL if another tag
     
    11171119 * @param   pThis       The DMG instance data.
    11181120 * @param   pszXml      The XML text to parse, UTF-8.
    1119  * @param   cch         The size of the XML text.
    11201121 */
    11211122static const char *dmgOpenXmlToRsrc(PDMGIMAGE pThis, char const *pszXml)
     
    12851286 * @param   pThis        The DMG instance data.
    12861287 * @param   pcszRsrcName Name of the resource to get.
     1288 * @param   ppcRsrc      Where to store the pointer to the resource data on success.
    12871289 */
    12881290static int dmgGetRsrcData(PDMGIMAGE pThis, const char *pcszRsrcName,
  • trunk/src/VBox/Storage/ISCSI.cpp

    r63905 r64272  
    17151715 *
    17161716 * @returns VBox status code.
    1717  * @param   pImage      The iSCSI connection state to be used.
     1717 * @param   pvUser      The iSCSI connection state to be used as opaque user data.
    17181718 */
    17191719static DECLCALLBACK(int) iscsiAttach(void *pvUser)
     
    17681768 *
    17691769 * @returns VBox status code.
    1770  * @param   pImage      The iSCSI connection state to be used.
     1770 * @param   pvUser      The iSCSI connection state to be used as opaque user data.
    17711771 */
    17721772static DECLCALLBACK(int) iscsiDetach(void *pvUser)
     
    21582158 * @returns VBOX status
    21592159 * @param   pImage      The iSCSI connection state to be used.
     2160 * @param   itt         The initiator task tag.
    21602161 * @param   paRes       Pointer to array of iSCSI response sections.
    21612162 * @param   cnRes       Number of valid iSCSI response sections in the array.
     
    29672968 * @param   cbBuf       Length of the key-value buffer.
    29682969 * @param   pcbBufCurr  Currently used portion of the key-value buffer.
    2969  * @param   pszKey      Pointer to a string containing the key.
    2970  * @param   pszValue    Pointer 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.
    29712972 * @param   cbValue     Length of the binary value if applicable.
    29722973 */
     
    30273028 * @param   pbBuf       Buffer containing key=value pairs.
    30283029 * @param   cbBuf       Length of buffer with key=value pairs.
    3029  * @param   pszKey      Pointer to key for which to retrieve the value.
    3030  * @param   ppszValue   Pointer to value string pointer.
     3030 * @param   pcszKey     Pointer to key for which to retrieve the value.
     3031 * @param   ppcszValue  Pointer to value string pointer.
    30313032 */
    30323033static int iscsiTextGetKeyValue(const uint8_t *pbBuf, size_t cbBuf, const char *pcszKey, const char **ppcszValue)
     
    30543055 *
    30553056 * @returns VBOX status
    3056  * @param   pszValue    Pointer to a string containing the textual value representation.
     3057 * @param   pcszValue   Pointer to a string containing the textual value representation.
    30573058 * @param   pbValue     Pointer to the value buffer for the binary value.
    30583059 * @param   pcbValue    In: length of value buffer, out: actual length of binary value.
  • trunk/src/VBox/Storage/QCOW.cpp

    r63905 r64272  
    775775 * @returns The start offset of the new cluster in the image.
    776776 * @param   pImage    The image instance data.
    777  * @param   cCLusters Number of clusters to allocate.
     777 * @param   cClusters Number of clusters to allocate.
    778778 */
    779779DECLINLINE(uint64_t) qcowClusterAllocate(PQCOWIMAGE pImage, uint32_t cClusters)
     
    857857 * @param   offTbl        The offset the table should be written to.
    858858 * @param   paTbl         The table to write.
     859 * @param   cbTbl         Size of the table in bytes.
     860 * @param   cTblEntries   Number entries in the table.
    859861 * @param   pfnComplete   Callback called when the write completes.
    860862 * @param   pvUser        Opaque user data to pass in the completion callback.
  • trunk/src/VBox/Storage/QED.cpp

    r63905 r64272  
    713713 * @returns The start offset of the new cluster in the image.
    714714 * @param   pImage    The image instance data.
    715  * @param   cCLusters Number of clusters to allocate.
     715 * @param   cClusters Number of clusters to allocate.
    716716 */
    717717DECLINLINE(uint64_t) qedClusterAllocate(PQEDIMAGE pImage, uint32_t cClusters)
     
    16531653}
    16541654
    1655 /** @copydoc VDIMAGEBACKEND::pfnWrite */
     1655/** @copydoc VDIMAGEBACKEND::pfnRead */
    16561656static DECLCALLBACK(int) qedRead(void *pBackendData, uint64_t uOffset, size_t cbToRead,
    16571657                                 PVDIOCTX pIoCtx, size_t *pcbActuallyRead)
     
    16921692}
    16931693
    1694 /** @copydoc VDIMAGEBACKEND::pfnRead */
     1694/** @copydoc VDIMAGEBACKEND::pfnWrite */
    16951695static DECLCALLBACK(int) qedWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite,
    16961696                                  PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
  • trunk/src/VBox/Storage/RAW.cpp

    r63905 r64272  
    515515
    516516/** @copydoc VDIMAGEBACKEND::pfnRead */
    517 static DECLCALLBACK(int) rawRead(void *pBackendData, uint64_t uOffset, size_t cbRead,
     517static DECLCALLBACK(int) rawRead(void *pBackendData, uint64_t uOffset, size_t cbToRead,
    518518                                 PVDIOCTX pIoCtx, size_t *pcbActuallyRead)
    519519{
     
    530530
    531531    rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset,
    532                                pIoCtx, cbRead);
     532                               pIoCtx, cbToRead);
    533533    if (RT_SUCCESS(rc))
    534534    {
    535         *pcbActuallyRead = cbRead;
    536         pImage->offAccess = uOffset + cbRead;
     535        *pcbActuallyRead = cbToRead;
     536        pImage->offAccess = uOffset + cbToRead;
    537537    }
    538538
     
    541541
    542542/** @copydoc VDIMAGEBACKEND::pfnWrite */
    543 static DECLCALLBACK(int) rawWrite(void *pBackendData, uint64_t uOffset, size_t cbWrite,
     543static DECLCALLBACK(int) rawWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite,
    544544                                  PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
    545545                                  size_t *pcbPostRead, unsigned fWrite)
     
    560560
    561561    rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage, uOffset,
    562                                 pIoCtx, cbWrite, NULL, NULL);
     562                                pIoCtx, cbToWrite, NULL, NULL);
    563563    if (RT_SUCCESS(rc))
    564564    {
    565         *pcbWriteProcess = cbWrite;
     565        *pcbWriteProcess = cbToWrite;
    566566        *pcbPostRead = 0;
    567567        *pcbPreRead  = 0;
    568         pImage->offAccess = uOffset + cbWrite;
     568        pImage->offAccess = uOffset + cbToWrite;
    569569    }
    570570
  • trunk/src/VBox/Storage/VCICache.cpp

    r63905 r64272  
    447447 * @param   cBlocks      The number of blocks the bitmap can manage.
    448448 * @param   ppBlkMap     Where to store the pointer to the block bitmap.
    449  * @param   pcbBlkMap    Where to store the size of the block bitmap in blocks
     449 * @param   pcBlkMap     Where to store the size of the block bitmap in blocks
    450450 *                       needed on the disk.
    451451 */
     
    14561456
    14571457/** @copydoc VDCACHEBACKEND::pfnProbe */
    1458 static DECLCALLBACK(int) vciProbe(const char *pszFilename, PVDINTERFACE pVDIfsCache,
     1458static DECLCALLBACK(int) vciProbe(const char *pszFilename, PVDINTERFACE pVDIfsDisk,
    14591459                                  PVDINTERFACE pVDIfsImage)
    14601460{
    1461     RT_NOREF1(pVDIfsCache);
     1461    RT_NOREF1(pVDIfsDisk);
    14621462    VciHdr Hdr;
    14631463    PVDIOSTORAGE pStorage = NULL;
  • trunk/src/VBox/Storage/VD.cpp

    r63905 r64272  
    32613261 * @returns VBox status code.
    32623262 * @param   pDisk              VD disk container.
    3263  * @param   pDiscard           The discard state.
     3263 * @param   pIoCtx             The I/O context associated with this discard operation.
    32643264 * @param   cbDiscardingNew    How many bytes should be waiting on success.
    32653265 *                             The number of bytes waiting can be less.
     
    45024502 * @returns VBox status code.
    45034503 * @param   pDisk    The disk to unlock.
     4504 * @param   pIoCtxRc The I/O context to get the status code from, optional.
    45044505 */
    45054506static int vdDiskUnlock(PVBOXHDD pDisk, PVDIOCTX pIoCtxRc)
     
    59745975 * @returns VBox status code.
    59755976 * @param   pszBackend      The backend name.
    5976  * @param   pEntries        Pointer to an entry.
     5977 * @param   pEntr        Pointer to an entry.
    59775978 */
    59785979VBOXDDU_DECL(int) VDBackendInfoOne(const char *pszBackend, PVDBACKENDINFO pEntry)
     
    60556056 * @return  VBox status code.
    60566057 * @param   pszFilter       The filter name (case insensitive).
    6057  * @param   pEntries        Pointer to an entry.
     6058 * @param   pEntr        Pointer to an entry.
    60586059 */
    60596060VBOXDDU_DECL(int) VDFilterInfoOne(const char *pszFilter, PVDFILTERINFO pEntry)
     
    81788179 * read/write behavior in this situation this needs to be extended.
    81798180 *
    8180  * @return  VBox status code.
    8181  * @return  VERR_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.
    81828183 * @param   pDiskFrom       Pointer to source HDD container.
    81838184 * @param   nImage          Image number, counts from 0. 0 is always base image of container.
     
    81898190 * @param   fMoveByRename   If true, attempt to perform a move by renaming (if successful the new size is ignored).
    81908191 * @param   cbSize          New image size (0 means leave unchanged).
    8191  * @param   nImageSameFrom  todo
    8192  * @param   nImageSameTo    todo
     8192 * @param   nImageFromSame  todo
     8193 * @param   nImageToSame    todo
    81938194 * @param   uImageFlags     Flags specifying special destination image features.
    81948195 * @param   pDstUuid        New UUID of the destination image. If NULL, a new UUID is created.
     
    93139314 *
    93149315 * @returns VBox status code.
    9315  * @returns VERR_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.
    93169317 * @param   pDisk           Pointer to HDD container.
    93179318 * @param   uOffset         Offset of first reading byte from start of disk.
     
    93819382 *
    93829383 * @returns VBox status code.
    9383  * @returns VERR_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.
    93849385 * @param   pDisk           Pointer to HDD container.
    93859386 * @param   uOffset         Offset of the first byte being
     
    94569457 *
    94579458 * @returns VBox status code.
    9458  * @returns VERR_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.
    94599460 * @param   pDisk           Pointer to HDD container.
    94609461 */
     
    1009410095 *
    1009510096 * @returns VBox status code.
    10096  * @returns VERR_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.
    1009710098 * @param   pDisk           Pointer to the HDD container.
    1009810099 * @param   nImage          Image number, counts from 0. 0 is always base image of container.
    10099  * @param   pbackendInfo    Where to store the backend information.
     10100 * @param   pBackendInfo    Where to store the backend information.
    1010010101 */
    1010110102VBOXDDU_DECL(int) VDBackendInfoSingle(PVBOXHDD pDisk, unsigned nImage,
  • trunk/src/VBox/Storage/VDI.cpp

    r63905 r64272  
    327327/**
    328328 * 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.
    330338 */
    331339static void vdiInitHeader(PVDIHEADER pHeader, uint32_t uImageFlags,
     
    19351943}
    19361944
    1937 /** @copydoc VDIMAGEBACKEND::pfnGetComment */
     1945/** @copydoc VDIMAGEBACKEND::pfnSetComment */
    19381946static DECLCALLBACK(int) vdiSetComment(void *pBackendData, const char *pszComment)
    19391947{
  • trunk/src/VBox/Storage/VDIfVfs2.cpp

    r62873 r64272  
    167167/** @interface_method_impl{VDINTERFACEIO,pfnOpen}  */
    168168static DECLCALLBACK(int) vdIfFromVfs_Open(void *pvUser, const char *pszLocation, uint32_t fOpen,
    169                                           PFNVDCOMPLETED pfnCompleted, void **ppInt)
     169                                          PFNVDCOMPLETED pfnCompleted, void **ppvStorage)
    170170{
    171171    RT_NOREF1(pszLocation);
     
    175175     * Validate input.
    176176     */
    177     AssertPtrReturn(ppInt, VERR_INVALID_POINTER);
     177    AssertPtrReturn(ppvStorage, VERR_INVALID_POINTER);
    178178    AssertPtrNullReturn(pfnCompleted, VERR_INVALID_PARAMETER);
    179179
     
    192192    pThis->pvCompletedUser  = pvUser;
    193193
    194     *ppInt = pThis->hVfsIos;
     194    *ppvStorage = pThis->hVfsIos;
    195195    return VINF_SUCCESS;
    196196}
  • trunk/src/VBox/Storage/VHD.cpp

    r63905 r64272  
    14481448
    14491449/** @interface_method_impl{VDIMAGEBACKEND,pfnRead} */
    1450 static DECLCALLBACK(int) vhdRead(void *pBackendData, uint64_t uOffset, size_t cbRead,
     1450static DECLCALLBACK(int) vhdRead(void *pBackendData, uint64_t uOffset, size_t cbToRead,
    14511451                                 PVDIOCTX pIoCtx, size_t *pcbActuallyRead)
    14521452{
     
    14541454    int rc = VINF_SUCCESS;
    14551455
    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));
    14571458
    14581459    AssertPtr(pImage);
    14591460    Assert(uOffset % 512 == 0);
    1460     Assert(cbRead % 512 == 0);
    1461     AssertReturn((VALID_PTR(pIoCtx) && cbRead), VERR_INVALID_PARAMETER);
    1462     AssertReturn(uOffset + cbRead <= 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);
    14631464
    14641465    /*
     
    14801481         * Clip read range to remain in this data block.
    14811482         */
    1482         cbRead = RT_MIN(cbRead, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE)));
     1483        cbToRead = RT_MIN(cbToRead, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE)));
    14831484
    14841485        /*
     
    14901491        {
    14911492            uVhdOffset = ((uint64_t)pImage->pBlockAllocationTable[cBlockAllocationTableEntry] + pImage->cDataBlockBitmapSectors + cBATEntryIndex) * VHD_SECTOR_SIZE;
    1492             LogFlowFunc(("uVhdOffset=%llu cbRead=%u\n", uVhdOffset, cbRead));
     1493            LogFlowFunc(("uVhdOffset=%llu cbToRead=%u\n", uVhdOffset, cbToRead));
    14931494
    14941495            /* Read in the block's bitmap. */
     
    15141515                     * must be read from child.
    15151516                     */
    1516                     while (   (cSectors < (cbRead / VHD_SECTOR_SIZE))
     1517                    while (   (cSectors < (cbToRead / VHD_SECTOR_SIZE))
    15171518                           && vhdBlockBitmapSectorContainsData(pImage, cBATEntryIndex))
    15181519                    {
     
    15211522                    }
    15221523
    1523                     cbRead = cSectors * VHD_SECTOR_SIZE;
    1524 
    1525                     LogFlowFunc(("uVhdOffset=%llu cbRead=%u\n", uVhdOffset, cbRead));
     1524                    cbToRead = cSectors * VHD_SECTOR_SIZE;
     1525
     1526                    LogFlowFunc(("uVhdOffset=%llu cbToRead=%u\n", uVhdOffset, cbToRead));
    15261527                    rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage,
    1527                                                uVhdOffset, pIoCtx, cbRead);
     1528                                               uVhdOffset, pIoCtx, cbToRead);
    15281529                }
    15291530                else
     
    15401541                    cSectors = 1;
    15411542
    1542                     while (   (cSectors < (cbRead / VHD_SECTOR_SIZE))
     1543                    while (   (cSectors < (cbToRead / VHD_SECTOR_SIZE))
    15431544                           && !vhdBlockBitmapSectorContainsData(pImage, cBATEntryIndex))
    15441545                    {
     
    15471548                    }
    15481549
    1549                     cbRead = cSectors * VHD_SECTOR_SIZE;
    1550                     LogFunc(("Sectors free: uVhdOffset=%llu cbRead=%u\n", uVhdOffset, cbRead));
     1550                    cbToRead = cSectors * VHD_SECTOR_SIZE;
     1551                    LogFunc(("Sectors free: uVhdOffset=%llu cbToRead=%u\n", uVhdOffset, cbToRead));
    15511552                    rc = VERR_VD_BLOCK_FREE;
    15521553                }
     
    15571558    }
    15581559    else
    1559         rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset, pIoCtx, cbRead);
     1560        rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset, pIoCtx, cbToRead);
    15601561
    15611562    if (pcbActuallyRead)
    1562         *pcbActuallyRead = cbRead;
     1563        *pcbActuallyRead = cbToRead;
    15631564
    15641565    LogFlowFunc(("returns rc=%Rrc\n", rc));
     
    15671568
    15681569/** @interface_method_impl{VDIMAGEBACKEND,pfnWrite} */
    1569 static DECLCALLBACK(int) vhdWrite(void *pBackendData, uint64_t uOffset, size_t cbWrite,
     1570static DECLCALLBACK(int) vhdWrite(void *pBackendData, uint64_t uOffset, size_t cbToWrite,
    15701571                         PVDIOCTX pIoCtx, size_t *pcbWriteProcess, size_t *pcbPreRead,
    15711572                         size_t *pcbPostRead, unsigned fWrite)
     
    15741575    int rc = VINF_SUCCESS;
    15751576
    1576     LogFlowFunc(("pBackendData=%p uOffset=%llu pIoCtx=%#p cbWrite=%u pcbWriteProcess=%p pcbPreRead=%p pcbPostRead=%p fWrite=%u\n",
    1577              pBackendData, uOffset, pIoCtx, cbWrite, 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));
    15781579
    15791580    AssertPtr(pImage);
    15801581    Assert(!(uOffset % VHD_SECTOR_SIZE));
    1581     Assert(!(cbWrite % VHD_SECTOR_SIZE));
    1582     AssertReturn((VALID_PTR(pIoCtx) && cbWrite), VERR_INVALID_PARAMETER);
    1583     AssertReturn(uOffset + cbWrite <= 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);
    15841585
    15851586    if (pImage->pBlockAllocationTable)
     
    15961597         * Clip write range.
    15971598         */
    1598         cbWrite = RT_MIN(cbWrite, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE)));
     1599        cbToWrite = RT_MIN(cbToWrite, (pImage->cbDataBlock - (cBATEntryIndex * VHD_SECTOR_SIZE)));
    15991600
    16001601        /*
     
    16111612            /* Check if the block allocation should be suppressed. */
    16121613            if (   (fWrite & VD_WRITE_NO_ALLOC)
    1613                 || (cbWrite != pImage->cbDataBlock))
     1614                || (cbToWrite != pImage->cbDataBlock))
    16141615            {
    16151616                *pcbPreRead = cBATEntryIndex * VHD_SECTOR_SIZE;
    1616                 *pcbPostRead = pImage->cSectorsPerDataBlock * VHD_SECTOR_SIZE - cbWrite - *pcbPreRead;
     1617                *pcbPostRead = pImage->cSectorsPerDataBlock * VHD_SECTOR_SIZE - cbToWrite - *pcbPreRead;
    16171618
    16181619                if (pcbWriteProcess)
    1619                     *pcbWriteProcess = cbWrite;
     1620                    *pcbWriteProcess = cbToWrite;
    16201621                return VERR_VD_BLOCK_FREE;
    16211622            }
     
    16321633
    16331634            /* Set the bits for all sectors having been written. */
    1634             for (uint32_t iSector = 0; iSector < (cbWrite / VHD_SECTOR_SIZE); iSector++)
     1635            for (uint32_t iSector = 0; iSector < (cbToWrite / VHD_SECTOR_SIZE); iSector++)
    16351636            {
    16361637                /* No need to check for a changed value because this is an initial write. */
     
    16691670                rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage,
    16701671                                            pImage->uCurrentEndOfFile + (pImage->cDataBlockBitmapSectors + (cSector % pImage->cSectorsPerDataBlock)) * VHD_SECTOR_SIZE,
    1671                                             pIoCtx, cbWrite,
     1672                                            pIoCtx, cbToWrite,
    16721673                                            vhdAsyncExpansionDataComplete,
    16731674                                            pExpand);
     
    17521753                /* Write data. */
    17531754                rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage,
    1754                                             uVhdOffset, pIoCtx, cbWrite,
     1755                                            uVhdOffset, pIoCtx, cbToWrite,
    17551756                                            NULL, NULL);
    17561757                if (RT_SUCCESS(rc) || rc == VERR_VD_ASYNC_IO_IN_PROGRESS)
     
    17591760
    17601761                    /* Set the bits for all sectors having been written. */
    1761                     for (uint32_t iSector = 0; iSector < (cbWrite / VHD_SECTOR_SIZE); iSector++)
     1762                    for (uint32_t iSector = 0; iSector < (cbToWrite / VHD_SECTOR_SIZE); iSector++)
    17621763                    {
    17631764                        fChanged |= vhdBlockBitmapSectorSet(pImage, pImage->pu8Bitmap, cBATEntryIndex);
     
    17891790    else
    17901791        rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage,
    1791                                     uOffset, pIoCtx, cbWrite, NULL, NULL);
     1792                                    uOffset, pIoCtx, cbToWrite, NULL, NULL);
    17921793
    17931794    if (pcbWriteProcess)
    1794         *pcbWriteProcess = cbWrite;
     1795        *pcbWriteProcess = cbToWrite;
    17951796
    17961797    /* Stay on the safe side. Do not run the risk of confusing the higher
  • trunk/src/VBox/Storage/VHDX.cpp

    r63905 r64272  
    7979    /** Version of the log format. */
    8080    uint16_t    u16LogVersion;
    81     /** VHDX format version.. */
     81    /** VHDX format version. */
    8282    uint16_t    u16Version;
    8383    /** Length of the log region. */
     
    803803 * @param   paBatEntriesConv    Where to store the converted BAT.
    804804 * @param   paBatEntries        The VHDX BAT to convert.
     805 * @param   cBatEntries         Number of entries in the BAT.
    805806 *
    806807 * @note It is safe to use the same pointer for paBatEntriesConv and paBatEntries.
  • trunk/src/VBox/Storage/VMDK.cpp

    r63905 r64272  
    13791379
    13801380/**
     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.
    13811386 * @param   ppszUnquoted    Where to store the return value, use RTMemTmpFree to
    13821387 *                          free.
     1388 * @param   ppszNext        Where to store the pointer to any character following
     1389 *                          the quoted value, optional.
    13831390 */
    13841391static int vmdkStringUnquote(PVMDKIMAGE pImage, const char *pszStr,
     
    15901597
    15911598/**
     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.
    15921606 * @param   ppszValue       Where to store the return value, use RTMemTmpFree to
    15931607 *                          free.
     
    17281742
    17291743/**
     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.
    17301752 * @param   ppszValue       Where to store the return value, use RTMemTmpFree to
    17311753 *                          free.
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette