VirtualBox

Changeset 48720 in vbox


Ignore:
Timestamp:
Sep 26, 2013 3:56:16 PM (11 years ago)
Author:
vboxsync
Message:

GuestCtrl/IGuestFile: Fixed initial offset reporting when using IGuestSession::openFileEx().

Location:
trunk/src/VBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService

  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp

    r47849 r48720  
    175175                    && uOffset)
    176176                {
    177                     /* Seeking is optional. */
    178                     int rc2 = RTFileSeek(pFile->hFile, (int64_t)uOffset, RTFILE_SEEK_BEGIN, NULL /* Current offset */);
    179                     if (RT_FAILURE(rc2))
     177                    /* Seeking is optional. However, the whole operation
     178                     * will fail if we don't succeed seeking to the wanted position. */
     179                    rc = RTFileSeek(pFile->hFile, (int64_t)uOffset, RTFILE_SEEK_BEGIN, NULL /* Current offset */);
     180                    if (RT_FAILURE(rc))
    180181                        VBoxServiceVerbose(3, "[File %s]: Seeking to offset %RU64 failed; rc=%Rrc\n",
    181182                                           pFile->szName, uOffset, rc);
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r47874 r48720  
    562562                              ("File ID %RU32 does not match context ID %RU32\n", mData.mID,
    563563                               VBOX_GUESTCTRL_CONTEXTID_GET_OBJECT(pCbCtx->uContextID)));
     564
     565                    /* Set the initial offset. On the guest the whole opening operation
     566                     * would fail if an initial seek isn't possible. */
     567                    mData.mOffCurrent = mData.mOpenInfo.mInitialOffset;
    564568                }
    565569
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