Changeset 13835 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib
- Timestamp:
- Nov 5, 2008 2:34:43 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 38826
- Location:
- trunk/src/VBox/Additions/common/VBoxGuestLib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp
r9435 r13835 32 32 int rc = VbglEnter (); 33 33 34 if ( VBOX_FAILURE(rc))34 if (RT_FAILURE(rc)) 35 35 return rc; 36 36 … … 69 69 int rc = VbglEnter (); 70 70 71 if ( VBOX_FAILURE(rc))71 if (RT_FAILURE(rc)) 72 72 return rc; 73 73 … … 95 95 int rc = VbglEnter (); 96 96 97 if ( VBOX_FAILURE(rc))97 if (RT_FAILURE(rc)) 98 98 return; 99 99 -
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCM.cpp
r10553 r13835 55 55 int rc = RTSemFastMutexRequest(g_vbgldata.mutexHGCMHandle); 56 56 57 VBGL_HGCM_ASSERTMsg( VBOX_SUCCESS(rc),57 VBGL_HGCM_ASSERTMsg(RT_SUCCESS(rc), 58 58 ("Failed to request handle heap mutex, rc = %Vrc\n", rc)); 59 59 … … 72 72 uint32_t i; 73 73 74 if ( VBOX_FAILURE (rc))74 if (RT_FAILURE (rc)) 75 75 return NULL; 76 76 … … 108 108 rc = vbglHandleHeapEnter (); 109 109 110 if ( VBOX_FAILURE (rc))110 if (RT_FAILURE (rc)) 111 111 return; 112 112 … … 139 139 rc = vbglDriverOpen (&pHandleData->driver); 140 140 141 if ( VBOX_SUCCESS(rc))141 if (RT_SUCCESS(rc)) 142 142 { 143 143 rc = vbglDriverIOCtl (&pHandleData->driver, VBOXGUEST_IOCTL_HGCM_CONNECT, pData, sizeof (*pData)); 144 144 145 if ( VBOX_SUCCESS(rc))145 if (RT_SUCCESS(rc)) 146 146 { 147 147 *pHandle = pHandleData; … … 153 153 } 154 154 155 if ( VBOX_FAILURE(rc))155 if (RT_FAILURE(rc)) 156 156 { 157 157 vbglHGCMHandleFree (pHandleData); -
trunk/src/VBox/Additions/common/VBoxGuestLib/HGCMInternal.cpp
r9662 r13835 47 47 rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMConnect, sizeof (VMMDevHGCMConnect), VMMDevReq_HGCMConnect); 48 48 49 if ( VBOX_SUCCESS(rc))49 if (RT_SUCCESS(rc)) 50 50 { 51 51 /* Initialize request memory */ … … 58 58 rc = VbglGRPerform (&pHGCMConnect->header.header); 59 59 60 if ( VBOX_SUCCESS(rc))60 if (RT_SUCCESS(rc)) 61 61 { 62 62 /* Check if host decides to process the request asynchronously. */ … … 69 69 pConnectInfo->result = pHGCMConnect->header.result; 70 70 71 if ( VBOX_SUCCESS (pConnectInfo->result))71 if (RT_SUCCESS (pConnectInfo->result)) 72 72 pConnectInfo->u32ClientID = pHGCMConnect->u32ClientID; 73 73 } … … 94 94 rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect); 95 95 96 if ( VBOX_SUCCESS(rc))96 if (RT_SUCCESS(rc)) 97 97 { 98 98 /* Initialize request memory */ … … 104 104 rc = VbglGRPerform (&pHGCMDisconnect->header.header); 105 105 106 if ( VBOX_SUCCESS(rc))106 if (RT_SUCCESS(rc)) 107 107 { 108 108 /* Check if host decides to process the request asynchronously. */ … … 151 151 /* dprintf (("VbglHGCMCall Allocated gr %p, rc = %Vrc, cbParms = %d\n", pHGCMCall, rc, cbParms)); */ 152 152 153 if ( VBOX_SUCCESS(rc))153 if (RT_SUCCESS(rc)) 154 154 { 155 155 void *apvCtx[VBOX_HGCM_MAX_PARMS]; … … 165 165 166 166 if (cbParms) 167 { 167 { 168 168 /* Lock user buffers. */ 169 169 pParm = VBOXGUEST_HGCM_CALL_PARMS(pCallInfo); … … 194 194 These kind of problems actually applies to some patched linux kernels too, including older 195 195 fedora releases. (The patch is the infamous 4G/4G patch, aka 4g4g, by Ingo Molnar.) */ 196 rc = vbglLockLinear (&apvCtx[iParm], (void *)pParm->u.Pointer.u.linearAddr, pParm->u.Pointer.size, (pParm->type == VMMDevHGCMParmType_LinAddr_In) ? false : true /* write access */); 196 rc = vbglLockLinear (&apvCtx[iParm], (void *)pParm->u.Pointer.u.linearAddr, pParm->u.Pointer.size, (pParm->type == VMMDevHGCMParmType_LinAddr_In) ? false : true /* write access */); 197 197 break; 198 198 default: … … 200 200 break; 201 201 } 202 if ( VBOX_FAILURE (rc))202 if (RT_FAILURE (rc)) 203 203 break; 204 204 } … … 207 207 208 208 /* Check that the parameter locking was ok. */ 209 if ( VBOX_SUCCESS(rc))209 if (RT_SUCCESS(rc)) 210 210 { 211 211 /* Anyone who needs this can re-enable it locally */ … … 218 218 /* dprintf (("VbglGRPerform rc = %Vrc (header rc=%d)\n", rc, pHGCMCall->header.result)); */ 219 219 220 /** If the call failed, but as a result of the request itself, then pretend success 220 /** If the call failed, but as a result of the request itself, then pretend success 221 221 * Upper layers will interpret the result code in the packet. 222 222 */ 223 if ( VBOX_FAILURE(rc) && rc == pHGCMCall->header.result)223 if (RT_FAILURE(rc) && rc == pHGCMCall->header.result) 224 224 { 225 225 Assert(pHGCMCall->header.fu32Flags & VBOX_HGCM_REQ_DONE); … … 227 227 } 228 228 229 if ( VBOX_SUCCESS(rc))229 if (RT_SUCCESS(rc)) 230 230 { 231 231 /* Check if host decides to process the request asynchronously. */ … … 260 260 } 261 261 } 262 262 263 263 /* Unlock user buffers. */ 264 264 pParm = VBOXGUEST_HGCM_CALL_PARMS(pCallInfo); -
trunk/src/VBox/Additions/common/VBoxGuestLib/Init.cpp
r11820 r13835 47 47 rc = vbglDriverOpen (&driver); 48 48 49 if ( VBOX_SUCCESS(rc))49 if (RT_SUCCESS(rc)) 50 50 { 51 51 VBoxGuestPortInfo port; … … 53 53 rc = vbglDriverIOCtl (&driver, VBOXGUEST_IOCTL_GETVMMDEVPORT, &port, sizeof (port)); 54 54 55 if ( VBOX_SUCCESS (rc))55 if (RT_SUCCESS (rc)) 56 56 { 57 57 dprintf (("port = 0x%04X, mem = %p\n", port.portAddress, port.pVMMDevMemory)); 58 58 59 59 g_vbgldata.portVMMDev = port.portAddress; 60 60 g_vbgldata.pVMMDevMemory = port.pVMMDevMemory; … … 82 82 83 83 rc = g_vbgldata.status == VbglStatusReady? VINF_SUCCESS: VERR_VBGL_NOT_INITIALIZED; 84 84 85 85 // dprintf(("VbglEnter: rc = %d\n", rc)); 86 86 87 87 return rc; 88 88 } … … 98 98 rc = VbglPhysHeapInit (); 99 99 100 if ( VBOX_SUCCESS(rc))100 if (RT_SUCCESS(rc)) 101 101 { 102 102 /* other subsystems, none yet */ … … 105 105 106 106 dprintf(("vbglInitCommon: rc = %d\n", rc)); 107 107 108 108 return rc; 109 109 } … … 125 125 126 126 dprintf(("vbglInit: starts g_vbgldata.status %d\n", g_vbgldata.status)); 127 127 128 128 if (g_vbgldata.status == VbglStatusInitializing 129 129 || g_vbgldata.status == VbglStatusReady) … … 135 135 rc = vbglInitCommon (); 136 136 137 if ( VBOX_SUCCESS(rc))137 if (RT_SUCCESS(rc)) 138 138 { 139 139 g_vbgldata.portVMMDev = portVMMDev; … … 173 173 rc = vbglInitCommon (); 174 174 175 if ( VBOX_SUCCESS(rc))175 if (RT_SUCCESS(rc)) 176 176 { 177 177 /* Try to obtain VMMDev port via IOCTL to VBoxGuest main driver. */ … … 182 182 #endif /* VBOX_WITH_HGCM */ 183 183 184 if ( VBOX_FAILURE(rc))184 if (RT_FAILURE(rc)) 185 185 { 186 186 vbglTerminateCommon (); -
trunk/src/VBox/Additions/common/VBoxGuestLib/PhysHeap.cpp
r12996 r13835 175 175 int rc = RTSemFastMutexRequest(g_vbgldata.mutexHeap); 176 176 177 VBGL_PH_ASSERTMsg( VBOX_SUCCESS(rc),177 VBGL_PH_ASSERTMsg(RT_SUCCESS(rc), 178 178 ("Failed to request heap mutex, rc = %Vrc\n", rc)); 179 179 … … 393 393 int rc = vbglPhysHeapEnter (); 394 394 395 if ( VBOX_FAILURE(rc))395 if (RT_FAILURE(rc)) 396 396 return NULL; 397 397 … … 513 513 514 514 int rc = vbglPhysHeapEnter (); 515 if ( VBOX_FAILURE(rc))515 if (RT_FAILURE(rc)) 516 516 return; 517 517 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxCalls.c
r9435 r13835 79 79 rc, data.result)); 80 80 */ 81 if ( VBOX_SUCCESS (rc))81 if (RT_SUCCESS (rc)) 82 82 { 83 83 rc = data.result; 84 84 } 85 85 86 if ( VBOX_SUCCESS (rc))86 if (RT_SUCCESS (rc)) 87 87 { 88 88 pClient->ulClientID = data.u32ClientID; … … 140 140 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 141 141 */ 142 if ( VBOX_SUCCESS (rc))143 { 144 rc = data.callInfo.result; 145 } 146 147 if ( VBOX_SUCCESS (rc))142 if (RT_SUCCESS (rc)) 143 { 144 rc = data.callInfo.result; 145 } 146 147 if (RT_SUCCESS (rc)) 148 148 { 149 149 *pcMappings = data.numberOfMappings.u.value32; … … 173 173 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 174 174 */ 175 if ( VBOX_SUCCESS (rc))175 if (RT_SUCCESS (rc)) 176 176 { 177 177 rc = data.callInfo.result; … … 212 212 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 213 213 */ 214 if ( VBOX_SUCCESS (rc))214 if (RT_SUCCESS (rc)) 215 215 { 216 216 pMap->root = data.root.u.value32; … … 237 237 rc = VbglHGCMCall (pClient->handle, &data.callInfo, sizeof (data)); 238 238 239 if ( VBOX_SUCCESS (rc))239 if (RT_SUCCESS (rc)) 240 240 { 241 241 pMap->root = data.root.u.value32; … … 262 262 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 263 263 */ 264 if ( VBOX_SUCCESS (rc))264 if (RT_SUCCESS (rc)) 265 265 { 266 266 rc = data.callInfo.result; … … 295 295 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 296 296 */ 297 if ( VBOX_SUCCESS (rc))297 if (RT_SUCCESS (rc)) 298 298 { 299 299 rc = data.callInfo.result; … … 321 321 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 322 322 */ 323 if ( VBOX_SUCCESS (rc))323 if (RT_SUCCESS (rc)) 324 324 { 325 325 rc = data.callInfo.result; … … 353 353 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 354 354 */ 355 if ( VBOX_SUCCESS (rc))355 if (RT_SUCCESS (rc)) 356 356 { 357 357 rc = data.callInfo.result; … … 389 389 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 390 390 */ 391 if ( VBOX_SUCCESS (rc))391 if (RT_SUCCESS (rc)) 392 392 { 393 393 rc = data.callInfo.result; … … 423 423 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 424 424 */ 425 if ( VBOX_SUCCESS (rc))425 if (RT_SUCCESS (rc)) 426 426 { 427 427 rc = data.callInfo.result; … … 458 458 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 459 459 */ 460 if ( VBOX_SUCCESS (rc))460 if (RT_SUCCESS (rc)) 461 461 { 462 462 rc = data.callInfo.result; … … 485 485 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 486 486 */ 487 if ( VBOX_SUCCESS (rc))487 if (RT_SUCCESS (rc)) 488 488 { 489 489 rc = data.callInfo.result; … … 537 537 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 538 538 */ 539 if ( VBOX_SUCCESS (rc))539 if (RT_SUCCESS (rc)) 540 540 { 541 541 rc = data.callInfo.result; … … 573 573 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 574 574 */ 575 if ( VBOX_SUCCESS (rc))575 if (RT_SUCCESS (rc)) 576 576 { 577 577 rc = data.callInfo.result; … … 608 608 "VbglHGCMCall rc = %#x, result = %#x\n", rc, data.callInfo.result)); 609 609 */ 610 if ( VBOX_SUCCESS (rc))610 if (RT_SUCCESS (rc)) 611 611 { 612 612 rc = data.callInfo.result; … … 623 623 VBOX_INIT_CALL (&callInfo, SET_UTF8, pClient); 624 624 rc = VbglHGCMCall (pClient->handle, &callInfo, sizeof (callInfo)); 625 if ( VBOX_SUCCESS (rc))625 if (RT_SUCCESS (rc)) 626 626 { 627 627 rc = callInfo.result; -
trunk/src/VBox/Additions/common/VBoxGuestLib/VMMDev.cpp
r8155 r13835 29 29 int rc = VbglEnter (); 30 30 31 if ( VBOX_FAILURE(rc))31 if (RT_FAILURE(rc)) 32 32 return rc; 33 33 34 34 /* If the memory was not found, return an error. */ 35 35 if (!g_vbgldata.pVMMDevMemory)
Note:
See TracChangeset
for help on using the changeset viewer.