Changeset 21776 in vbox for trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
- Timestamp:
- Jul 23, 2009 2:13:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r21523 r21776 156 156 #ifdef IN_GUEST 157 157 158 # ifdef RT_OS_WINDOWS158 # ifdef RT_OS_WINDOWS 159 159 DWORD cbReturned; 160 160 … … 170 170 crDebug("vboxCall failed with %x\n", GetLastError()); 171 171 return VERR_NOT_SUPPORTED; 172 #else 173 # ifdef RT_OS_SOLARIS 172 # else 173 int rc; 174 # ifdef RT_OS_SOLARIS 174 175 VBGLBIGREQ Hdr; 175 176 Hdr.u32Magic = VBGLBIGREQ_MAGIC; 176 177 Hdr.cbData = cbData; 177 178 Hdr.pvDataR3 = pvData; 178 # if HC_ARCH_BITS == 32179 # if HC_ARCH_BITS == 32 179 180 Hdr.u32Padding = 0; 181 # endif 182 rc = ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CALL(cbData), &Hdr); 183 # else 184 rc = ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CALL(cbData), pvData); 180 185 # endif 181 if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CALL(cbData), &Hdr) >= 0) 182 # else 183 if (ioctl(g_crvboxhgcm.iGuestDrv, VBOXGUEST_IOCTL_HGCM_CALL(cbData), pvData) >= 0) 184 # endif 186 # ifdef RT_OS_LINUX 187 if (rc == 0) 188 # else 189 if (rc >= 0) 190 # endif 185 191 { 186 192 return VINF_SUCCESS; 187 193 } 188 crWarning("vboxCall failed with %x\n", errno); 194 # ifdef RT_OS_LINUX 195 if (rc >= 0) /* positive values are negated VBox error status codes. */ 196 crWarning("vboxCall failed with VBox status code %d\n", -rc); 197 else 198 # endif 199 crWarning("vboxCall failed with %x\n", errno); 189 200 return VERR_NOT_SUPPORTED; 190 # endif /*#ifdef RT_OS_WINDOWS*/201 # endif /*#ifdef RT_OS_WINDOWS*/ 191 202 192 203 #else /*#ifdef IN_GUEST*/ … … 327 338 int rc; 328 339 329 parms.hdr.result = V INF_SUCCESS;340 parms.hdr.result = VERR_WRONG_ORDER; 330 341 parms.hdr.u32ClientID = conn->u32ClientID; 331 342 parms.hdr.u32Function = SHCRGL_GUEST_FN_WRITE; … … 349 360 int rc; 350 361 351 parms.hdr.result = V INF_SUCCESS;362 parms.hdr.result = VERR_WRONG_ORDER; 352 363 parms.hdr.u32ClientID = conn->u32ClientID; 353 364 parms.hdr.u32Function = SHCRGL_GUEST_FN_READ; … … 392 403 int rc; 393 404 394 parms.hdr.result = V INF_SUCCESS;405 parms.hdr.result = VERR_WRONG_ORDER; 395 406 parms.hdr.u32ClientID = conn->u32ClientID; 396 407 parms.hdr.u32Function = SHCRGL_GUEST_FN_WRITE_READ; … … 511 522 CRASSERT(!conn->pBuffer); 512 523 513 parms.hdr.result = V INF_SUCCESS;524 parms.hdr.result = VERR_WRONG_ORDER; 514 525 parms.hdr.u32ClientID = conn->u32ClientID; 515 526 parms.hdr.u32Function = SHCRGL_GUEST_FN_READ; … … 676 687 int rc; 677 688 678 parms.hdr.result = V INF_SUCCESS;689 parms.hdr.result = VERR_WRONG_ORDER; 679 690 parms.hdr.u32ClientID = conn->u32ClientID; 680 691 parms.hdr.u32Function = SHCRGL_GUEST_FN_SET_VERSION;
Note:
See TracChangeset
for help on using the changeset viewer.