VirtualBox

Changeset 7275 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 4, 2008 1:39:44 PM (17 years ago)
Author:
vboxsync
Message:

Silly bug in the new VDI creation code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r7231 r7275  
    374374        goto out;
    375375    }
     376    pImage->File = File;
    376377
    377378    cbTotal =   pImage->offStartData
     
    397398         * effective than expanding file by write operations.
    398399         */
    399         rc = RTFileSetSize(pImage->File, cbTotal);
     400        rc = RTFileSetSize(File, cbTotal);
    400401    }
    401402    else
     
    414415
    415416    /* Write pre-header. */
    416     rc = RTFileWriteAt(pImage->File, 0, &pImage->PreHeader, sizeof(pImage->PreHeader), NULL);
     417    rc = RTFileWriteAt(File, 0, &pImage->PreHeader, sizeof(pImage->PreHeader), NULL);
    417418    if (VBOX_FAILURE(rc))
    418419    {
     
    422423
    423424    /* Write header. */
    424     rc = RTFileWriteAt(pImage->File, sizeof(pImage->PreHeader), &pImage->Header.u.v1plus, sizeof(pImage->Header.u.v1plus), NULL);
     425    rc = RTFileWriteAt(File, sizeof(pImage->PreHeader), &pImage->Header.u.v1plus, sizeof(pImage->Header.u.v1plus), NULL);
    425426    if (VBOX_FAILURE(rc))
    426427    {
     
    429430    }
    430431
    431     rc = RTFileWriteAt(pImage->File, pImage->offStartBlocks,
     432    rc = RTFileWriteAt(File, pImage->offStartBlocks,
    432433                       pImage->paBlocks,
    433434                       getImageBlocks(&pImage->Header) * sizeof(VDIIMAGEBLOCKPOINTER),
     
    464465            unsigned cbChunk = (unsigned)RT_MIN(cbFill, cbBuf);
    465466
    466             rc = RTFileWriteAt(pImage->File, pImage->offStartData + uOff,
     467            rc = RTFileWriteAt(File, pImage->offStartData + uOff,
    467468                               pvBuf, cbChunk, NULL);
    468469            if (VBOX_FAILURE(rc))
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