Changeset 48854 in vbox for trunk/src/VBox/Storage/DMG.cpp
- Timestamp:
- Oct 3, 2013 9:48:48 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/DMG.cpp
r48852 r48854 457 457 { 458 458 /* 459 * The I/O context stuff seems to complicated and undocument that I'm 460 * not going to bother trying implement this efficiently right now. 459 * Alloate a temporary buffer on the stack or heap and use 460 * vdIfIoIntIoCtxCopyTo to work the context. 461 * 462 * The I/O context stuff seems too complicated and undocument that I'm 463 * not going to bother trying to implement this efficiently right now. 461 464 */ 462 465 void *pvFree = NULL; … … 466 469 else 467 470 pvFree = pvBuf = RTMemTmpAlloc(cbToRead); 468 if ( !pvBuf)471 if (pvBuf) 469 472 { 470 473 rc = RTVfsFileReadAt(pThis->hDmgFileInXar, off, pvBuf, cbToRead, NULL); … … 1441 1444 * @returns VBox status code. 1442 1445 * @param fOpen Flags for defining the open type. 1443 * @param pVDIfs Io The storage I/O interface touse.1446 * @param pVDIfs List of VD I/O interfaces that we can use. 1444 1447 * @param pvStorage The storage pointer that goes with @a pVDIfsIo. 1445 1448 * @param pszFilename The input filename, optional. … … 1452 1455 * is being in serveral places. 1453 1456 */ 1454 static int dmgOpenImageWithinXar(uint32_t fOpen, PVDINTERFACE IO pVDIfsIo, void *pvStorage, const char *pszFilename,1457 static int dmgOpenImageWithinXar(uint32_t fOpen, PVDINTERFACE pVDIfs, void *pvStorage, const char *pszFilename, 1455 1458 PRTVFSFSSTREAM phXarFss, PRTVFSFILE phDmgFileInXar) 1456 1459 { … … 1458 1461 * Open the XAR file stream. 1459 1462 */ 1460 if (!pVDIfsIo)1461 return VERR_INVALID_PARAMETER;1462 1463 1463 RTVFSFILE hVfsFile; 1464 int rc = VDIfCreateVfsFile(pVDIfs Io, pvStorage, fOpen, &hVfsFile);1464 int rc = VDIfCreateVfsFile(pVDIfs, pvStorage, fOpen, &hVfsFile); 1465 1465 if (RT_FAILURE(rc)) 1466 1466 return rc; … … 1566 1566 { 1567 1567 rc = dmgOpenImageWithinXar(VDOpenFlagsToFileOpenFlags(uOpenFlags, false /* fCreate */), 1568 VDIfIoGet(pThis->pVDIfsImage),1568 pThis->pVDIfsImage, 1569 1569 pThis->pStorage, 1570 1570 pThis->pszFilename, … … 1710 1710 { 1711 1711 rc = dmgOpenImageWithinXar(RTFILE_O_OPEN | RTFILE_O_READ | RTFILE_O_DENY_WRITE, 1712 VDIfIoGet(pVDIfsImage), pStorage, NULL /* pszFilename */,1712 pVDIfsImage, pStorage, NULL /* pszFilename */, 1713 1713 &hXarFss, &hDmgFileInXar); 1714 1714 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.