VirtualBox

Changeset 77245 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 10, 2019 11:39:42 PM (6 years ago)
Author:
vboxsync
Message:

HGCM,SharedFolders: Added new variation on the HGCM page list type that does not use a bounce buffer. bugref:9172 [fix]

  • Added VMMDevHGCMParmType_NoBouncePageList.
  • Made VMMDevHGCMParmType_Embedded and VMMDevHGCMParmType_ContiguousPageList return updated buffer size to the guest.
  • Changed the SHFL_FN_READ and SHFL_FN_WRITE function to accept VMMDevHGCMParmType_NoBouncePageList as buffer parameter type, using the RTFileSgReadAt/WriteAt functions to do the work.
  • Modified the offset parameter of SHFL_FN_WRITE to return an update offset to assist in the RTFILE_O_APPEND scenarios where other parties have extended the file without the guest knowing. The guest now gets the file size returned after each write to an handle opened with RTFILE_O_APPEND.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedFolders/VBoxSharedFoldersSvc.cpp

    r77243 r77245  
    666666
    667667            /* Verify parameters values. */
    668             ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_ROOT, rc == VERR_INVALID_PARAMETER);
    669             ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_NIL,  rc == VERR_INVALID_HANDLE);
     668            ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_ROOT, rc = VERR_INVALID_PARAMETER);
     669            ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_NIL,  rc = VERR_INVALID_HANDLE);
    670670            if (paParms[4].type == VBOX_HGCM_SVC_PARM_PTR)
    671                 ASSERT_GUEST_STMT_BREAK(cbRead <= paParms[4].u.pointer.size, rc == VERR_INVALID_HANDLE);
    672             else
    673                 ASSERT_GUEST_STMT_BREAK(cbRead <= paParms[4].u.Pages.cb, rc == VERR_OUT_OF_RANGE);
     671                ASSERT_GUEST_STMT_BREAK(cbRead <= paParms[4].u.pointer.size, rc = VERR_INVALID_HANDLE);
     672            else
     673                ASSERT_GUEST_STMT_BREAK(cbRead <= paParms[4].u.Pages.cb, rc = VERR_OUT_OF_RANGE);
    674674
    675675            /* Execute the function. */
     
    715715
    716716            /* Verify parameters values. */
    717             ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_ROOT, rc == VERR_INVALID_PARAMETER);
    718             ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_NIL,  rc == VERR_INVALID_HANDLE);
     717            ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_ROOT, rc = VERR_INVALID_PARAMETER);
     718            ASSERT_GUEST_STMT_BREAK(hFile != SHFL_HANDLE_NIL,  rc = VERR_INVALID_HANDLE);
    719719            if (paParms[4].type == VBOX_HGCM_SVC_PARM_PTR)
    720                 ASSERT_GUEST_STMT_BREAK(cbWrite <= paParms[4].u.pointer.size, rc == VERR_INVALID_HANDLE);
    721             else
    722                 ASSERT_GUEST_STMT_BREAK(cbWrite <= paParms[4].u.Pages.cb, rc == VERR_OUT_OF_RANGE);
     720                ASSERT_GUEST_STMT_BREAK(cbWrite <= paParms[4].u.pointer.size, rc = VERR_INVALID_HANDLE);
     721            else
     722                ASSERT_GUEST_STMT_BREAK(cbWrite <= paParms[4].u.Pages.cb, rc = VERR_OUT_OF_RANGE);
    723723
    724724            /* Execute the function. */
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