Changeset 26959 in vbox for trunk/src/VBox
- Timestamp:
- Mar 2, 2010 5:08:52 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
r26917 r26959 330 330 /** Size of volume in sectors. */ 331 331 uint64_t cVolume; 332 /** Total volume size in bytes. Easier tha tmultiplying the above values all the time. */332 /** Total volume size in bytes. Easier than multiplying the above values all the time. */ 333 333 uint64_t cbSize; 334 334 … … 882 882 * 883 883 * @returns VBox status. 884 * @param pImage The iSCSI connection state to be used.884 * @param pImage The iSCSI connection state to be used. 885 885 */ 886 886 static int iscsiAttach(PISCSIIMAGE pImage) … … 939 939 restart: 940 940 if (pImage->Socket == NIL_RTSOCKET) 941 { 941 942 rc = iscsiTransportOpen(pImage); 943 if (RT_FAILURE(rc)) 944 goto out; 945 } 942 946 943 947 pImage->state = ISCSISTATE_IN_LOGIN; … … 1317 1321 * 1318 1322 * @returns VBox status. 1319 * @param pImage The iSCSI connection state to be used.1323 * @param pImage The iSCSI connection state to be used. 1320 1324 */ 1321 1325 static int iscsiDetach(PISCSIIMAGE pImage) … … 1405 1409 * 1406 1410 * @returns VBOX status. 1407 * @param pImage The iSCSI connection state to be used.1408 * @param pRequest 1409 * 1410 * 1411 * 1411 * @param pImage The iSCSI connection state to be used. 1412 * @param pRequest Command descriptor. Contains all information about 1413 * the command, its transfer directions and pointers 1414 * to the buffer(s) used for transferring data and 1415 * status information. 1412 1416 */ 1413 1417 static int iscsiCommand(PISCSIIMAGE pImage, PSCSIREQ pRequest) … … 1627 1631 * 1628 1632 * @returns Initiator Task Tag. 1629 * @param pImage The iSCSI connection state to be used.1633 * @param pImage The iSCSI connection state to be used. 1630 1634 */ 1631 1635 static uint32_t iscsiNewITT(PISCSIIMAGE pImage) … … 1645 1649 * 1646 1650 * @returns VBOX status 1647 * @param pImage The iSCSI connection state to be used.1648 * @param paReq Pointer to array of iSCSI request sections.1649 * @param cnReq Number of valid iSCSI request sections in the array.1651 * @param pImage The iSCSI connection state to be used. 1652 * @param paReq Pointer to array of iSCSI request sections. 1653 * @param cnReq Number of valid iSCSI request sections in the array. 1650 1654 */ 1651 1655 static int iscsiSendPDU(PISCSIIMAGE pImage, PISCSIREQ paReq, uint32_t cnReq) 1652 1656 { 1653 1657 int rc = VINF_SUCCESS; 1654 uint32_t i;1655 1658 /** @todo return VERR_VD_ISCSI_INVALID_STATE in the appropriate situations, 1656 1659 * needs cleaning up of timeout/disconnect handling a bit, as otherwise … … 1660 1663 Assert(paReq[0].cbSeg >= ISCSI_BHS_SIZE); 1661 1664 1662 for ( i = 0; i < pImage->cISCSIRetries; i++)1665 for (uint32_t i = 0; i < pImage->cISCSIRetries; i++) 1663 1666 { 1664 1667 rc = iscsiTransportWrite(pImage, paReq, cnReq); … … 1691 1694 * 1692 1695 * @returns VBOX status 1693 * @param pImage The iSCSI connection state to be used.1694 * @param paRes Pointer to array of iSCSI response sections.1695 * @param cnRes Number of valid iSCSI response sections in the array.1696 * @param pImage The iSCSI connection state to be used. 1697 * @param paRes Pointer to array of iSCSI response sections. 1698 * @param cnRes Number of valid iSCSI response sections in the array. 1696 1699 */ 1697 1700 static int iscsiRecvPDU(PISCSIIMAGE pImage, uint32_t itt, PISCSIRES paRes, uint32_t cnRes) 1698 1701 { 1699 1702 int rc = VINF_SUCCESS; 1700 uint32_t i;1701 1703 ISCSIRES aResBuf; 1702 1704 1703 for ( i = 0; i < pImage->cISCSIRetries; i++)1705 for (uint32_t i = 0; i < pImage->cISCSIRetries; i++) 1704 1706 { 1705 1707 aResBuf.pvSeg = pImage->pvRecvPDUBuf; … … 1801 1803 if (cbSeg > paRes[j].cbSeg) 1802 1804 { 1803 memcpy(paRes[j].pvSeg, pSrc, paRes[ i].cbSeg);1805 memcpy(paRes[j].pvSeg, pSrc, paRes[j].cbSeg); 1804 1806 pSrc += paRes[j].cbSeg; 1805 1807 cbSeg -= paRes[j].cbSeg; … … 1859 1861 * 1860 1862 * @returns VBOX status 1861 * @param paRes Pointer to array of iSCSI response sections.1862 * @param cnRes Number of valid iSCSI response sections in the array.1863 * @param paRes Pointer to array of iSCSI response sections. 1864 * @param cnRes Number of valid iSCSI response sections in the array. 1863 1865 */ 1864 1866 static int drvISCSIValidatePDU(PISCSIRES paRes, uint32_t cnRes) … … 2016 2018 * 2017 2019 * @returns VBOX status. 2018 * @param pbBuf Buffer containing key=value pairs.2019 * @param cbBuf Length of buffer with key=value pairs.2020 * @param pszKey Pointer to key for which to retrieve the value.2021 * @param ppszValue Pointer to value string pointer.2020 * @param pbBuf Buffer containing key=value pairs. 2021 * @param cbBuf Length of buffer with key=value pairs. 2022 * @param pszKey Pointer to key for which to retrieve the value. 2023 * @param ppszValue Pointer to value string pointer. 2022 2024 */ 2023 2025 static int iscsiTextGetKeyValue(const uint8_t *pbBuf, size_t cbBuf, const char *pcszKey, const char **ppcszValue) … … 2148 2150 * 2149 2151 * @returns VBOX status. 2150 * @param pImage Current iSCSI initiator state.2151 * @param pbBuf Buffer containing key=value pairs.2152 * @param cbBuf Length of buffer with key=value pairs.2152 * @param pImage Current iSCSI initiator state. 2153 * @param pbBuf Buffer containing key=value pairs. 2154 * @param cbBuf Length of buffer with key=value pairs. 2153 2155 */ 2154 2156 static int iscsiUpdateParameters(PISCSIIMAGE pImage, const uint8_t *pbBuf, size_t cbBuf)
Note:
See TracChangeset
for help on using the changeset viewer.