VirtualBox

Changeset 68476 in vbox


Ignore:
Timestamp:
Aug 18, 2017 4:33:55 PM (7 years ago)
Author:
vboxsync
Message:

VBoxGuestLib/HGCM.cpp: cleanups (this is ring-0 code affecting shared folders only)

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuestLib.h

    r68465 r68476  
    305305 * Connect to a service.
    306306 *
    307  * @param pHandle     Pointer to variable that will hold a handle to be used
    308  *                    further in VbglHGCMCall and VbglHGCMClose.
    309  * @param pData       Connection information structure.
    310  *
    311  * @return VBox status code.
    312  */
    313 DECLVBGL(int) VbglHGCMConnect (VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData);
     307 * @param pHandle           Pointer to variable that will hold a handle to be used
     308 *                          further in VbglHGCMCall and VbglHGCMClose.
     309 * @param pszServiceName    The service to connect to.
     310 * @param pidClient         Where to return the client ID for the connection.
     311 *
     312 * @return VBox status code.
     313 *
     314 * @todo consider baking the client Id into the handle.
     315 */
     316DECLVBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient);
    314317
    315318/**
     
    317320 *
    318321 * @param handle      Handle of the connection.
    319  * @param pData       Disconnect request information structure.
    320  *
    321  * @return VBox status code.
    322  */
    323 DECLVBGL(int) VbglHGCMDisconnect (VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData);
     322 * @param idClient    The ID of the client connection.
     323 *
     324 * @return VBox status code.
     325 *
     326 * @todo consider baking the client Id into the handle.
     327 */
     328DECLVBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient);
    324329
    325330/**
     
    332337 * @return VBox status code.
    333338 */
    334 DECLVBGL(int) VbglHGCMCall (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
     339DECLVBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
    335340
    336341/**
     
    344349 * @return VBox status code.
    345350 */
    346 DECLVBGL(int) VbglHGCMCallUserData (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
     351DECLVBGL(int) VbglR0HGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);
    347352
    348353/**
     
    356361 * @return VBox status code.
    357362 */
    358 DECLVBGL(int) VbglHGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData);
     363DECLVBGL(int) VbglR0HGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData);
    359364/** @} */
    360365
  • trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp

    r68103 r68476  
    11/* $Id$ */
    22/** @file
    3  * VBoxGuestLib - Host-Guest Communication Manager.
     3 * VBoxGuestLib - Host-Guest Communication Manager, ring-0 client drivers.
    44 *
    55 * These public functions can be only used by other drivers. They all
     
    2828 */
    2929
     30/*********************************************************************************************************************************
     31*   Header Files                                                                                                                 *
     32*********************************************************************************************************************************/
    3033/* Entire file is ifdef'ed with !VBGL_VBOXGUEST */
    3134#ifndef VBGL_VBOXGUEST
     
    3942#define VBGL_HGCM_ASSERT_MSG AssertReleaseMsg
    4043
     44/*********************************************************************************************************************************
     45*   Global Variables                                                                                                             *
     46*********************************************************************************************************************************/
    4147/**
    4248 * Fast heap for HGCM handles data.
    4349 * @{
    4450 */
    45 
    46 static RTSEMFASTMUTEX mutexHGCMHandle;
    47 
    48 static struct VBGLHGCMHANDLEDATA aHGCMHandleData[64];
    49 
     51static RTSEMFASTMUTEX            g_hMtxHGCMHandleData;
     52static struct VBGLHGCMHANDLEDATA g_aHGCMHandleData[64];
    5053/** @} */
     54
    5155
    5256/**
     
    5761DECLVBGL(int) VbglR0HGCMInit(void)
    5862{
    59     AssertReturn(mutexHGCMHandle == NIL_RTSEMFASTMUTEX, VINF_ALREADY_INITIALIZED);
    60     return RTSemFastMutexCreate(&mutexHGCMHandle);
     63    AssertReturn(g_hMtxHGCMHandleData == NIL_RTSEMFASTMUTEX, VINF_ALREADY_INITIALIZED);
     64    return RTSemFastMutexCreate(&g_hMtxHGCMHandleData);
    6165}
    6266
     
    6872DECLVBGL(int) VbglR0HGCMTerminate(void)
    6973{
    70     RTSemFastMutexDestroy(mutexHGCMHandle);
    71     mutexHGCMHandle = NIL_RTSEMFASTMUTEX;
     74    RTSemFastMutexDestroy(g_hMtxHGCMHandleData);
     75    g_hMtxHGCMHandleData = NIL_RTSEMFASTMUTEX;
    7276
    7377    return VINF_SUCCESS;
    7478}
    7579
    76 DECLINLINE(int) vbglHandleHeapEnter(void)
    77 {
    78     int rc = RTSemFastMutexRequest(mutexHGCMHandle);
     80DECLINLINE(int) vbglR0HandleHeapEnter(void)
     81{
     82    int rc = RTSemFastMutexRequest(g_hMtxHGCMHandleData);
    7983
    8084    VBGL_HGCM_ASSERT_MSG(RT_SUCCESS(rc), ("Failed to request handle heap mutex, rc = %Rrc\n", rc));
     
    8387}
    8488
    85 DECLINLINE(void) vbglHandleHeapLeave(void)
    86 {
    87     RTSemFastMutexRelease(mutexHGCMHandle);
    88 }
    89 
    90 struct VBGLHGCMHANDLEDATA *vbglHGCMHandleAlloc(void)
     89DECLINLINE(void) vbglR0HandleHeapLeave(void)
     90{
     91    RTSemFastMutexRelease(g_hMtxHGCMHandleData);
     92}
     93
     94struct VBGLHGCMHANDLEDATA *vbglR0HGCMHandleAlloc(void)
    9195{
    9296    struct VBGLHGCMHANDLEDATA *p = NULL;
    93     int rc = vbglHandleHeapEnter();
     97    int rc = vbglR0HandleHeapEnter();
    9498    if (RT_SUCCESS(rc))
    9599    {
     
    98102        /* Simple linear search in array. This will be called not so often, only connect/disconnect. */
    99103        /** @todo bitmap for faster search and other obvious optimizations. */
    100         for (i = 0; i < RT_ELEMENTS(aHGCMHandleData); i++)
     104        for (i = 0; i < RT_ELEMENTS(g_aHGCMHandleData); i++)
    101105        {
    102             if (!aHGCMHandleData[i].fAllocated)
     106            if (!g_aHGCMHandleData[i].fAllocated)
    103107            {
    104                 p = &aHGCMHandleData[i];
     108                p = &g_aHGCMHandleData[i];
    105109                p->fAllocated = 1;
    106110                break;
     
    108112        }
    109113
    110         vbglHandleHeapLeave();
     114        vbglR0HandleHeapLeave();
    111115
    112116        VBGL_HGCM_ASSERT_MSG(p != NULL, ("Not enough HGCM handles.\n"));
     
    115119}
    116120
    117 void vbglHGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle)
     121void vbglR0HGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle)
    118122{
    119123    if (pHandle)
    120124    {
    121         int rc = vbglHandleHeapEnter();
     125        int rc = vbglR0HandleHeapEnter();
    122126        if (RT_SUCCESS(rc))
    123127        {
     
    125129
    126130            RT_ZERO(*pHandle);
    127             vbglHandleHeapLeave();
     131            vbglR0HandleHeapLeave();
    128132        }
    129133    }
    130134}
    131135
    132 DECLVBGL(int) VbglHGCMConnect(VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData)
     136DECLVBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient)
    133137{
    134138    int rc;
    135     if (pHandle && pData)
     139    if (pHandle && pszServiceName && pidClient)
    136140    {
    137         struct VBGLHGCMHANDLEDATA *pHandleData = vbglHGCMHandleAlloc();
     141        struct VBGLHGCMHANDLEDATA *pHandleData = vbglR0HGCMHandleAlloc();
    138142        if (pHandleData)
    139143        {
     
    141145            if (RT_SUCCESS(rc))
    142146            {
    143                 rc = vbglDriverIOCtl(&pHandleData->driver, VBOXGUEST_IOCTL_HGCM_CONNECT, pData, sizeof(*pData));
    144                 if (RT_SUCCESS(rc))
    145                     rc = pData->result;
     147                VBoxGuestHGCMConnectInfo Info;
     148                RT_ZERO(Info);
     149                Info.result       = VINF_SUCCESS;
     150                Info.u32ClientID  = 0;
     151                Info.Loc.type     = VMMDevHGCMLoc_LocalHost_Existing;
     152                rc = RTStrCopy(Info.Loc.u.host.achName, sizeof(Info.Loc.u.host.achName), pszServiceName);
    146153                if (RT_SUCCESS(rc))
    147154                {
    148                     *pHandle = pHandleData;
    149                     return rc;
     155                    rc = vbglDriverIOCtl(&pHandleData->driver, VBOXGUEST_IOCTL_HGCM_CONNECT, &Info, sizeof(Info));
     156                    if (RT_SUCCESS(rc))
     157                        rc = Info.result;
     158                    if (RT_SUCCESS(rc))
     159                    {
     160                        *pidClient = Info.u32ClientID;
     161                        *pHandle   = pHandleData;
     162                        return rc;
     163                    }
    150164                }
    151165
     
    153167            }
    154168
    155             vbglHGCMHandleFree(pHandleData);
     169            vbglR0HGCMHandleFree(pHandleData);
    156170        }
    157171        else
     
    163177}
    164178
    165 DECLVBGL(int) VbglHGCMDisconnect(VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData)
    166 {
    167     int rc = vbglDriverIOCtl(&handle->driver, VBOXGUEST_IOCTL_HGCM_DISCONNECT, pData, sizeof(*pData));
     179DECLVBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient)
     180{
     181    int rc;
     182    VBoxGuestHGCMDisconnectInfo Info;
     183
     184    RT_ZERO(Info);
     185    Info.result      = VINF_SUCCESS;
     186    Info.u32ClientID = idClient;
     187    rc = vbglDriverIOCtl(&handle->driver, VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
    168188
    169189    vbglDriverClose(&handle->driver);
    170190
    171     vbglHGCMHandleFree(handle);
     191    vbglR0HGCMHandleFree(handle);
    172192
    173193    return rc;
    174194}
    175195
    176 DECLVBGL(int) VbglHGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)
     196DECLVBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)
    177197{
    178198    VBGL_HGCM_ASSERT_MSG(cbData >= sizeof(VBoxGuestHGCMCallInfo) + pData->cParms * sizeof(HGCMFunctionParameter),
     
    183203}
    184204
    185 DECLVBGL(int) VbglHGCMCallUserData (VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)
     205DECLVBGL(int) VbglR0HGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)
    186206{
    187207    VBGL_HGCM_ASSERT_MSG(cbData >= sizeof(VBoxGuestHGCMCallInfo) + pData->cParms * sizeof(HGCMFunctionParameter),
     
    193213
    194214
    195 DECLVBGL(int) VbglHGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData)
     215DECLVBGL(int) VbglR0HGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData)
    196216{
    197217    uint32_t cbExpected = sizeof(VBoxGuestHGCMCallInfoTimed)
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h

    r68103 r68476  
    139139
    140140#ifdef VBOX_WITH_HGCM
    141 struct VBGLHGCMHANDLEDATA  *vbglHGCMHandleAlloc(void);
    142 void                        vbglHGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle);
     141struct VBGLHGCMHANDLEDATA  *vbglR0HGCMHandleAlloc(void);
     142void                        vbglR0HGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle);
    143143#endif /* VBOX_WITH_HGCM */
    144144
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp

    r62521 r68476  
    4141    if (phCtl)
    4242    {
    43         struct VBGLHGCMHANDLEDATA *pHandleData = vbglHGCMHandleAlloc();
     43        struct VBGLHGCMHANDLEDATA *pHandleData = vbglR0HGCMHandleAlloc();
    4444
    4545        if (pHandleData)
     
    5353            }
    5454
    55             vbglHGCMHandleFree(pHandleData);
     55            vbglR0HGCMHandleFree(pHandleData);
    5656        }
    5757        else
     
    7070    vbglDriverClose(&hCtl->driver);
    7171
    72     vbglHGCMHandleFree(hCtl);
     72    vbglR0HGCMHandleFree(hCtl);
    7373
    7474    return VINF_SUCCESS;
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c

    r68104 r68476  
    7373DECLVBGL(int) VbglR0SfConnect(PVBGLSFCLIENT pClient)
    7474{
    75     int rc;
    76     VBoxGuestHGCMConnectInfo data;
    77 
    78     pClient->handle = NULL;
    79 
    80     RT_ZERO(data);
    81     data.result   = VINF_SUCCESS;
    82     data.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
    83 #if defined(RT_OS_LINUX)
    84     strcpy(data.Loc.u.host.achName, "VBoxSharedFolders");
    85 #else
    86     RTStrCopy(data.Loc.u.host.achName, sizeof(data.Loc.u.host.achName), "VBoxSharedFolders");
    87 #endif
    88 
    89     rc = VbglHGCMConnect(&pClient->handle, &data);
    90 /*    Log(("VBOXSF: VbglR0SfConnect: VbglHGCMConnect rc = %#x, result = %#x\n", rc, data.result)); */
    91     if (RT_SUCCESS(rc))
    92         rc = data.result;
    93     if (RT_SUCCESS(rc))
    94     {
    95         pClient->idClient = data.u32ClientID;
     75    int rc = VbglR0HGCMConnect(&pClient->handle, "VBoxSharedFolders", &pClient->idClient);
     76    if (RT_SUCCESS(rc))
    9677        LogFunc(("idClient=%d\n", pClient->idClient));
    97     }
     78    else
     79        LogFunc(("VbglR0HGCMConnect failed -> rc=%Rrc\n", rc));
    9880    return rc;
    9981}
     
    10284{
    10385    int rc;
    104     VBoxGuestHGCMDisconnectInfo data;
    105 
    10686    LogFunc(("u32ClientID=%d\n", pClient->idClient));
    10787    if (pClient->handle == NULL)
    10888        return;                 /* not connected */
    10989
    110     RT_ZERO(data);
    111     data.result      = VINF_SUCCESS;
    112     data.u32ClientID = pClient->idClient;
    113 
    114     rc = VbglHGCMDisconnect(pClient->handle, &data);
     90    rc = VbglR0HGCMDisconnect(pClient->handle, pClient->idClient);
    11591    NOREF(rc);
    116 /*    Log(("VBOXSF: VbglR0SfDisconnect: VbglHGCMDisconnect rc = %#x, result = %#x\n", rc, data.result)); */
     92/*    Log(("VBOXSF: VbglR0SfDisconnect: VbglR0HGCMDisconnect -> %#x\n", rc)); */
     93    pClient->idClient = 0;
     94    pClient->handle   = NULL;
    11795    return;
    11896}
     
    136114
    137115/*    Log(("VBOXSF: in ifs difference %d\n", (char *)&data.flags.type - (char *)&data.callInfo.cParms)); */
    138     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    139 /*    Log(("VBOXSF: VbglR0SfQueryMappings: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     116    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     117/*    Log(("VBOXSF: VbglR0SfQueryMappings: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    140118    if (RT_SUCCESS(rc))
    141119        rc = data.callInfo.result;
     
    160138    data.name.u.Pointer.u.linearAddr = (uintptr_t)pString;
    161139
    162     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    163 /*    Log(("VBOXSF: VbglR0SfQueryMapName: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     140    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     141/*    Log(("VBOXSF: VbglR0SfQueryMapName: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    164142    if (RT_SUCCESS(rc))
    165143        rc = data.callInfo.result;
     
    192170#endif
    193171
    194     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    195 /*    Log(("VBOXSF: VbglR0SfMapFolder: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     172    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     173/*    Log(("VBOXSF: VbglR0SfMapFolder: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    196174    if (RT_SUCCESS(rc))
    197175    {
     
    216194        OldData.delimiter.u.value32          = RTPATH_DELIMITER;
    217195
    218         rc = VbglHGCMCall(pClient->handle, &OldData.callInfo, sizeof(OldData));
     196        rc = VbglR0HGCMCall(pClient->handle, &OldData.callInfo, sizeof(OldData));
    219197        if (RT_SUCCESS(rc))
    220198        {
     
    236214    data.root.u.value32                 = pMap->root;
    237215
    238     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    239 /*    Log(("VBOXSF: VbglR0SfUnmapFolder: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     216    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     217/*    Log(("VBOXSF: VbglR0SfUnmapFolder: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    240218    if (RT_SUCCESS(rc))
    241219        rc = data.callInfo.result;
     
    262240    data.parms.u.Pointer.u.linearAddr = (uintptr_t)pCreateParms;
    263241
    264     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    265 /*    Log(("VBOXSF: VbglR0SfCreate: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     242    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     243/*    Log(("VBOXSF: VbglR0SfCreate: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    266244    if (RT_SUCCESS(rc))
    267245        rc = data.callInfo.result;
     
    282260    data.handle.u.value64               = Handle;
    283261
    284     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    285 /*    Log(("VBOXSF: VbglR0SfClose: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     262    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     263/*    Log(("VBOXSF: VbglR0SfClose: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    286264    if (RT_SUCCESS(rc))
    287265        rc = data.callInfo.result;
     
    307285    data.flags.u.value32                = flags;
    308286
    309     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    310 /*    Log(("VBOXSF: VbglR0SfRemove: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     287    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     288/*    Log(("VBOXSF: VbglR0SfRemove: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    311289    if (RT_SUCCESS (rc))
    312290        rc = data.callInfo.result;
     
    335313    data.flags.u.value32                = flags;
    336314
    337     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    338 /*    Log(("VBOXSF: VbglR0SfRename: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     315    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     316/*    Log(("VBOXSF: VbglR0SfRename: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    339317    if (RT_SUCCESS (rc))
    340318        rc = data.callInfo.result;
     
    363341    data.buffer.u.Pointer.u.linearAddr  = (uintptr_t)pBuffer;
    364342
    365     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    366 /*    Log(("VBOXSF: VbglR0SfRead: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     343    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     344/*    Log(("VBOXSF: VbglR0SfRead: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    367345    if (RT_SUCCESS(rc))
    368346    {
     
    407385        pPgLst->aPages[iPage] = paPages[iPage];
    408386
    409     rc = VbglHGCMCall(pClient->handle, &pData->callInfo, cbData);
    410 /*    Log(("VBOXSF: VbglR0SfReadPageList: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     387    rc = VbglR0HGCMCall(pClient->handle, &pData->callInfo, cbData);
     388/*    Log(("VBOXSF: VbglR0SfReadPageList: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    411389    if (RT_SUCCESS(rc))
    412390    {
     
    440418    data.buffer.u.Pointer.u.linearAddr  = (uintptr_t)pBuffer;
    441419
    442     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    443 /*    Log(("VBOXSF: VbglR0SfWrite: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     420    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     421/*    Log(("VBOXSF: VbglR0SfWrite: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    444422    if (RT_SUCCESS(rc))
    445423    {
     
    486464        pPgLst->aPages[iPage] = PhysBuffer;
    487465
    488     rc = VbglHGCMCall(pClient->handle, &pData->callInfo, cbData);
    489 /*    Log(("VBOXSF: VbglR0SfWritePhysCont: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     466    rc = VbglR0HGCMCall(pClient->handle, &pData->callInfo, cbData);
     467/*    Log(("VBOXSF: VbglR0SfWritePhysCont: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    490468    if (RT_SUCCESS(rc))
    491469    {
     
    533511        pPgLst->aPages[iPage] = paPages[iPage];
    534512
    535     rc = VbglHGCMCall(pClient->handle, &pData->callInfo, cbData);
    536 /*    Log(("VBOXSF: VbglR0SfWritePageList: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     513    rc = VbglR0HGCMCall(pClient->handle, &pData->callInfo, cbData);
     514/*    Log(("VBOXSF: VbglR0SfWritePageList: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    537515    if (RT_SUCCESS(rc))
    538516    {
     
    558536    data.handle.u.value64               = hFile;
    559537
    560     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    561 /*    Log(("VBOXSF: VbglR0SfFlush: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     538    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     539/*    Log(("VBOXSF: VbglR0SfFlush: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    562540    if (RT_SUCCESS(rc))
    563541        rc = data.callInfo.result;
     
    603581    data.cFiles.u.value32               = 0; /* out parameters only */
    604582
    605     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     583    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    606584/*    Log(("VBOXSF: VbglR0SfDirInfo: rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    607585    if (RT_SUCCESS(rc))
     
    633611    data.info.u.Pointer.u.linearAddr    = (uintptr_t)pBuffer;
    634612
    635     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    636 /*    Log(("VBOXSF: VbglR0SfFsInfo: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     613    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     614/*    Log(("VBOXSF: VbglR0SfFsInfo: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    637615    if (RT_SUCCESS(rc))
    638616    {
     
    664642    data.flags.u.value32                = fLock;
    665643
    666     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    667 /*    Log(("VBOXSF: VbglR0SfLock: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     644    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     645/*    Log(("VBOXSF: VbglR0SfLock: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    668646    if (RT_SUCCESS (rc))
    669647        rc = data.callInfo.result;
     
    677655
    678656    VBOX_INIT_CALL(&callInfo, SET_UTF8, pClient);
    679     rc = VbglHGCMCall(pClient->handle, &callInfo, sizeof(callInfo));
    680 /*    Log(("VBOXSF: VbglR0SfSetUtf8: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     657    rc = VbglR0HGCMCall(pClient->handle, &callInfo, sizeof(callInfo));
     658/*    Log(("VBOXSF: VbglR0SfSetUtf8: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    681659    if (RT_SUCCESS(rc))
    682660        rc = callInfo.result;
     
    702680    data.buffer.u.Pointer.u.linearAddr  = (uintptr_t)pBuffer;
    703681
    704     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    705 /*    Log(("VBOXSF: VbglR0SfReadLink: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     682    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     683/*    Log(("VBOXSF: VbglR0SfReadLink: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    706684    if (RT_SUCCESS (rc))
    707685        rc = data.callInfo.result;
     
    732710    data.info.u.Pointer.u.linearAddr    = (uintptr_t)pBuffer;
    733711
    734     rc = VbglHGCMCall(pClient->handle, &data.callInfo, sizeof(data));
    735 /*    Log(("VBOXSF: VbglR0SfSymlink: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     712    rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data));
     713/*    Log(("VBOXSF: VbglR0SfSymlink: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    736714    if (RT_SUCCESS (rc))
    737715        rc = data.callInfo.result;
     
    745723
    746724    VBOX_INIT_CALL(&callInfo, SET_SYMLINKS, pClient);
    747     rc = VbglHGCMCall(pClient->handle, &callInfo, sizeof(callInfo));
    748 /*    Log(("VBOXSF: VbglR0SfSetSymlinks: VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
     725    rc = VbglR0HGCMCall(pClient->handle, &callInfo, sizeof(callInfo));
     726/*    Log(("VBOXSF: VbglR0SfSetSymlinks: VbglR0HGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); */
    749727    if (RT_SUCCESS(rc))
    750728        rc = callInfo.result;
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