Changeset 68476 in vbox
- Timestamp:
- Aug 18, 2017 4:33:55 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestLib.h
r68465 r68476 305 305 * Connect to a service. 306 306 * 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 */ 316 DECLVBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient); 314 317 315 318 /** … … 317 320 * 318 321 * @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 */ 328 DECLVBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient); 324 329 325 330 /** … … 332 337 * @return VBox status code. 333 338 */ 334 DECLVBGL(int) Vbgl HGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);339 DECLVBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData); 335 340 336 341 /** … … 344 349 * @return VBox status code. 345 350 */ 346 DECLVBGL(int) Vbgl HGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData);351 DECLVBGL(int) VbglR0HGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData); 347 352 348 353 /** … … 356 361 * @return VBox status code. 357 362 */ 358 DECLVBGL(int) Vbgl HGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData);363 DECLVBGL(int) VbglR0HGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData); 359 364 /** @} */ 360 365 -
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
r68103 r68476 1 1 /* $Id$ */ 2 2 /** @file 3 * VBoxGuestLib - Host-Guest Communication Manager .3 * VBoxGuestLib - Host-Guest Communication Manager, ring-0 client drivers. 4 4 * 5 5 * These public functions can be only used by other drivers. They all … … 28 28 */ 29 29 30 /********************************************************************************************************************************* 31 * Header Files * 32 *********************************************************************************************************************************/ 30 33 /* Entire file is ifdef'ed with !VBGL_VBOXGUEST */ 31 34 #ifndef VBGL_VBOXGUEST … … 39 42 #define VBGL_HGCM_ASSERT_MSG AssertReleaseMsg 40 43 44 /********************************************************************************************************************************* 45 * Global Variables * 46 *********************************************************************************************************************************/ 41 47 /** 42 48 * Fast heap for HGCM handles data. 43 49 * @{ 44 50 */ 45 46 static RTSEMFASTMUTEX mutexHGCMHandle; 47 48 static struct VBGLHGCMHANDLEDATA aHGCMHandleData[64]; 49 51 static RTSEMFASTMUTEX g_hMtxHGCMHandleData; 52 static struct VBGLHGCMHANDLEDATA g_aHGCMHandleData[64]; 50 53 /** @} */ 54 51 55 52 56 /** … … 57 61 DECLVBGL(int) VbglR0HGCMInit(void) 58 62 { 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); 61 65 } 62 66 … … 68 72 DECLVBGL(int) VbglR0HGCMTerminate(void) 69 73 { 70 RTSemFastMutexDestroy( mutexHGCMHandle);71 mutexHGCMHandle= NIL_RTSEMFASTMUTEX;74 RTSemFastMutexDestroy(g_hMtxHGCMHandleData); 75 g_hMtxHGCMHandleData = NIL_RTSEMFASTMUTEX; 72 76 73 77 return VINF_SUCCESS; 74 78 } 75 79 76 DECLINLINE(int) vbgl HandleHeapEnter(void)77 { 78 int rc = RTSemFastMutexRequest( mutexHGCMHandle);80 DECLINLINE(int) vbglR0HandleHeapEnter(void) 81 { 82 int rc = RTSemFastMutexRequest(g_hMtxHGCMHandleData); 79 83 80 84 VBGL_HGCM_ASSERT_MSG(RT_SUCCESS(rc), ("Failed to request handle heap mutex, rc = %Rrc\n", rc)); … … 83 87 } 84 88 85 DECLINLINE(void) vbgl HandleHeapLeave(void)86 { 87 RTSemFastMutexRelease( mutexHGCMHandle);88 } 89 90 struct VBGLHGCMHANDLEDATA *vbgl HGCMHandleAlloc(void)89 DECLINLINE(void) vbglR0HandleHeapLeave(void) 90 { 91 RTSemFastMutexRelease(g_hMtxHGCMHandleData); 92 } 93 94 struct VBGLHGCMHANDLEDATA *vbglR0HGCMHandleAlloc(void) 91 95 { 92 96 struct VBGLHGCMHANDLEDATA *p = NULL; 93 int rc = vbgl HandleHeapEnter();97 int rc = vbglR0HandleHeapEnter(); 94 98 if (RT_SUCCESS(rc)) 95 99 { … … 98 102 /* Simple linear search in array. This will be called not so often, only connect/disconnect. */ 99 103 /** @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++) 101 105 { 102 if (! aHGCMHandleData[i].fAllocated)106 if (!g_aHGCMHandleData[i].fAllocated) 103 107 { 104 p = & aHGCMHandleData[i];108 p = &g_aHGCMHandleData[i]; 105 109 p->fAllocated = 1; 106 110 break; … … 108 112 } 109 113 110 vbgl HandleHeapLeave();114 vbglR0HandleHeapLeave(); 111 115 112 116 VBGL_HGCM_ASSERT_MSG(p != NULL, ("Not enough HGCM handles.\n")); … … 115 119 } 116 120 117 void vbgl HGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle)121 void vbglR0HGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle) 118 122 { 119 123 if (pHandle) 120 124 { 121 int rc = vbgl HandleHeapEnter();125 int rc = vbglR0HandleHeapEnter(); 122 126 if (RT_SUCCESS(rc)) 123 127 { … … 125 129 126 130 RT_ZERO(*pHandle); 127 vbgl HandleHeapLeave();131 vbglR0HandleHeapLeave(); 128 132 } 129 133 } 130 134 } 131 135 132 DECLVBGL(int) Vbgl HGCMConnect(VBGLHGCMHANDLE *pHandle, VBoxGuestHGCMConnectInfo *pData)136 DECLVBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient) 133 137 { 134 138 int rc; 135 if (pHandle && p Data)139 if (pHandle && pszServiceName && pidClient) 136 140 { 137 struct VBGLHGCMHANDLEDATA *pHandleData = vbgl HGCMHandleAlloc();141 struct VBGLHGCMHANDLEDATA *pHandleData = vbglR0HGCMHandleAlloc(); 138 142 if (pHandleData) 139 143 { … … 141 145 if (RT_SUCCESS(rc)) 142 146 { 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); 146 153 if (RT_SUCCESS(rc)) 147 154 { 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 } 150 164 } 151 165 … … 153 167 } 154 168 155 vbgl HGCMHandleFree(pHandleData);169 vbglR0HGCMHandleFree(pHandleData); 156 170 } 157 171 else … … 163 177 } 164 178 165 DECLVBGL(int) VbglHGCMDisconnect(VBGLHGCMHANDLE handle, VBoxGuestHGCMDisconnectInfo *pData) 166 { 167 int rc = vbglDriverIOCtl(&handle->driver, VBOXGUEST_IOCTL_HGCM_DISCONNECT, pData, sizeof(*pData)); 179 DECLVBGL(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)); 168 188 169 189 vbglDriverClose(&handle->driver); 170 190 171 vbgl HGCMHandleFree(handle);191 vbglR0HGCMHandleFree(handle); 172 192 173 193 return rc; 174 194 } 175 195 176 DECLVBGL(int) Vbgl HGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)196 DECLVBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData) 177 197 { 178 198 VBGL_HGCM_ASSERT_MSG(cbData >= sizeof(VBoxGuestHGCMCallInfo) + pData->cParms * sizeof(HGCMFunctionParameter), … … 183 203 } 184 204 185 DECLVBGL(int) Vbgl HGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData)205 DECLVBGL(int) VbglR0HGCMCallUserData(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfo *pData, uint32_t cbData) 186 206 { 187 207 VBGL_HGCM_ASSERT_MSG(cbData >= sizeof(VBoxGuestHGCMCallInfo) + pData->cParms * sizeof(HGCMFunctionParameter), … … 193 213 194 214 195 DECLVBGL(int) Vbgl HGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData)215 DECLVBGL(int) VbglR0HGCMCallTimed(VBGLHGCMHANDLE handle, VBoxGuestHGCMCallInfoTimed *pData, uint32_t cbData) 196 216 { 197 217 uint32_t cbExpected = sizeof(VBoxGuestHGCMCallInfoTimed) -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLInternal.h
r68103 r68476 139 139 140 140 #ifdef VBOX_WITH_HGCM 141 struct VBGLHGCMHANDLEDATA *vbgl HGCMHandleAlloc(void);142 void vbgl HGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle);141 struct VBGLHGCMHANDLEDATA *vbglR0HGCMHandleAlloc(void); 142 void vbglR0HGCMHandleFree(struct VBGLHGCMHANDLEDATA *pHandle); 143 143 #endif /* VBOX_WITH_HGCM */ 144 144 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibCrOgl.cpp
r62521 r68476 41 41 if (phCtl) 42 42 { 43 struct VBGLHGCMHANDLEDATA *pHandleData = vbgl HGCMHandleAlloc();43 struct VBGLHGCMHANDLEDATA *pHandleData = vbglR0HGCMHandleAlloc(); 44 44 45 45 if (pHandleData) … … 53 53 } 54 54 55 vbgl HGCMHandleFree(pHandleData);55 vbglR0HGCMHandleFree(pHandleData); 56 56 } 57 57 else … … 70 70 vbglDriverClose(&hCtl->driver); 71 71 72 vbgl HGCMHandleFree(hCtl);72 vbglR0HGCMHandleFree(hCtl); 73 73 74 74 return VINF_SUCCESS; -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
r68104 r68476 73 73 DECLVBGL(int) VbglR0SfConnect(PVBGLSFCLIENT pClient) 74 74 { 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)) 96 77 LogFunc(("idClient=%d\n", pClient->idClient)); 97 } 78 else 79 LogFunc(("VbglR0HGCMConnect failed -> rc=%Rrc\n", rc)); 98 80 return rc; 99 81 } … … 102 84 { 103 85 int rc; 104 VBoxGuestHGCMDisconnectInfo data;105 106 86 LogFunc(("u32ClientID=%d\n", pClient->idClient)); 107 87 if (pClient->handle == NULL) 108 88 return; /* not connected */ 109 89 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); 115 91 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; 117 95 return; 118 96 } … … 136 114 137 115 /* Log(("VBOXSF: in ifs difference %d\n", (char *)&data.flags.type - (char *)&data.callInfo.cParms)); */ 138 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));139 /* Log(("VBOXSF: VbglR0SfQueryMappings: Vbgl HGCMCall 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)); */ 140 118 if (RT_SUCCESS(rc)) 141 119 rc = data.callInfo.result; … … 160 138 data.name.u.Pointer.u.linearAddr = (uintptr_t)pString; 161 139 162 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));163 /* Log(("VBOXSF: VbglR0SfQueryMapName: Vbgl HGCMCall 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)); */ 164 142 if (RT_SUCCESS(rc)) 165 143 rc = data.callInfo.result; … … 192 170 #endif 193 171 194 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));195 /* Log(("VBOXSF: VbglR0SfMapFolder: Vbgl HGCMCall 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)); */ 196 174 if (RT_SUCCESS(rc)) 197 175 { … … 216 194 OldData.delimiter.u.value32 = RTPATH_DELIMITER; 217 195 218 rc = Vbgl HGCMCall(pClient->handle, &OldData.callInfo, sizeof(OldData));196 rc = VbglR0HGCMCall(pClient->handle, &OldData.callInfo, sizeof(OldData)); 219 197 if (RT_SUCCESS(rc)) 220 198 { … … 236 214 data.root.u.value32 = pMap->root; 237 215 238 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));239 /* Log(("VBOXSF: VbglR0SfUnmapFolder: Vbgl HGCMCall 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)); */ 240 218 if (RT_SUCCESS(rc)) 241 219 rc = data.callInfo.result; … … 262 240 data.parms.u.Pointer.u.linearAddr = (uintptr_t)pCreateParms; 263 241 264 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));265 /* Log(("VBOXSF: VbglR0SfCreate: Vbgl HGCMCall 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)); */ 266 244 if (RT_SUCCESS(rc)) 267 245 rc = data.callInfo.result; … … 282 260 data.handle.u.value64 = Handle; 283 261 284 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));285 /* Log(("VBOXSF: VbglR0SfClose: Vbgl HGCMCall 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)); */ 286 264 if (RT_SUCCESS(rc)) 287 265 rc = data.callInfo.result; … … 307 285 data.flags.u.value32 = flags; 308 286 309 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));310 /* Log(("VBOXSF: VbglR0SfRemove: Vbgl HGCMCall 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)); */ 311 289 if (RT_SUCCESS (rc)) 312 290 rc = data.callInfo.result; … … 335 313 data.flags.u.value32 = flags; 336 314 337 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));338 /* Log(("VBOXSF: VbglR0SfRename: Vbgl HGCMCall 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)); */ 339 317 if (RT_SUCCESS (rc)) 340 318 rc = data.callInfo.result; … … 363 341 data.buffer.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 364 342 365 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));366 /* Log(("VBOXSF: VbglR0SfRead: Vbgl HGCMCall 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)); */ 367 345 if (RT_SUCCESS(rc)) 368 346 { … … 407 385 pPgLst->aPages[iPage] = paPages[iPage]; 408 386 409 rc = Vbgl HGCMCall(pClient->handle, &pData->callInfo, cbData);410 /* Log(("VBOXSF: VbglR0SfReadPageList: Vbgl HGCMCall 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)); */ 411 389 if (RT_SUCCESS(rc)) 412 390 { … … 440 418 data.buffer.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 441 419 442 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));443 /* Log(("VBOXSF: VbglR0SfWrite: Vbgl HGCMCall 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)); */ 444 422 if (RT_SUCCESS(rc)) 445 423 { … … 486 464 pPgLst->aPages[iPage] = PhysBuffer; 487 465 488 rc = Vbgl HGCMCall(pClient->handle, &pData->callInfo, cbData);489 /* Log(("VBOXSF: VbglR0SfWritePhysCont: Vbgl HGCMCall 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)); */ 490 468 if (RT_SUCCESS(rc)) 491 469 { … … 533 511 pPgLst->aPages[iPage] = paPages[iPage]; 534 512 535 rc = Vbgl HGCMCall(pClient->handle, &pData->callInfo, cbData);536 /* Log(("VBOXSF: VbglR0SfWritePageList: Vbgl HGCMCall 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)); */ 537 515 if (RT_SUCCESS(rc)) 538 516 { … … 558 536 data.handle.u.value64 = hFile; 559 537 560 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));561 /* Log(("VBOXSF: VbglR0SfFlush: Vbgl HGCMCall 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)); */ 562 540 if (RT_SUCCESS(rc)) 563 541 rc = data.callInfo.result; … … 603 581 data.cFiles.u.value32 = 0; /* out parameters only */ 604 582 605 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));583 rc = VbglR0HGCMCall(pClient->handle, &data.callInfo, sizeof(data)); 606 584 /* Log(("VBOXSF: VbglR0SfDirInfo: rc = %#x, result = %#x\n", rc, data.callInfo.result)); */ 607 585 if (RT_SUCCESS(rc)) … … 633 611 data.info.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 634 612 635 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));636 /* Log(("VBOXSF: VbglR0SfFsInfo: Vbgl HGCMCall 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)); */ 637 615 if (RT_SUCCESS(rc)) 638 616 { … … 664 642 data.flags.u.value32 = fLock; 665 643 666 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));667 /* Log(("VBOXSF: VbglR0SfLock: Vbgl HGCMCall 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)); */ 668 646 if (RT_SUCCESS (rc)) 669 647 rc = data.callInfo.result; … … 677 655 678 656 VBOX_INIT_CALL(&callInfo, SET_UTF8, pClient); 679 rc = Vbgl HGCMCall(pClient->handle, &callInfo, sizeof(callInfo));680 /* Log(("VBOXSF: VbglR0SfSetUtf8: Vbgl HGCMCall 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)); */ 681 659 if (RT_SUCCESS(rc)) 682 660 rc = callInfo.result; … … 702 680 data.buffer.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 703 681 704 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));705 /* Log(("VBOXSF: VbglR0SfReadLink: Vbgl HGCMCall 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)); */ 706 684 if (RT_SUCCESS (rc)) 707 685 rc = data.callInfo.result; … … 732 710 data.info.u.Pointer.u.linearAddr = (uintptr_t)pBuffer; 733 711 734 rc = Vbgl HGCMCall(pClient->handle, &data.callInfo, sizeof(data));735 /* Log(("VBOXSF: VbglR0SfSymlink: Vbgl HGCMCall 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)); */ 736 714 if (RT_SUCCESS (rc)) 737 715 rc = data.callInfo.result; … … 745 723 746 724 VBOX_INIT_CALL(&callInfo, SET_SYMLINKS, pClient); 747 rc = Vbgl HGCMCall(pClient->handle, &callInfo, sizeof(callInfo));748 /* Log(("VBOXSF: VbglR0SfSetSymlinks: Vbgl HGCMCall 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)); */ 749 727 if (RT_SUCCESS(rc)) 750 728 rc = callInfo.result;
Note:
See TracChangeset
for help on using the changeset viewer.