Changeset 6470 in vbox for trunk/src/VBox
- Timestamp:
- Jan 24, 2008 7:09:56 AM (17 years ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBGLR3Internal.h
r6469 r6470 23 23 __BEGIN_DECLS 24 24 25 int VbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData);26 int VbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cb, VMMDevRequestType enmReqType);27 int VbglR3GRPerform(VMMDevRequestHeader *pReq);28 void VbglR3GRFree(VMMDevRequestHeader *pReq);25 int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData); 26 int vbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cb, VMMDevRequestType enmReqType); 27 int vbglR3GRPerform(VMMDevRequestHeader *pReq); 28 void vbglR3GRFree(VMMDevRequestHeader *pReq); 29 29 30 30 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r6469 r6470 150 150 * while on OS/2 we use the 2nd buffer of the IOCtl. 151 151 */ 152 int VbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData)152 int vbglR3DoIOCtl(unsigned iFunction, void *pvData, size_t cbData) 153 153 { 154 154 #ifdef RT_OS_OS2 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp
r6469 r6470 44 44 strcpy(Info.Loc.u.host.achName, "VBoxSharedClipboard"); 45 45 46 int rc = VbglR3DoIOCtl(IOCTL_VBOXGUEST_HGCM_CONNECT, &Info, sizeof(Info));46 int rc = vbglR3DoIOCtl(IOCTL_VBOXGUEST_HGCM_CONNECT, &Info, sizeof(Info)); 47 47 if (RT_SUCCESS(rc)) 48 48 { … … 67 67 Info.u32ClientID = u32ClientId; 68 68 69 int rc = VbglR3DoIOCtl(IOCTL_VBOXGUEST_HGCM_DISCONNECT, &Info, sizeof(Info));69 int rc = vbglR3DoIOCtl(IOCTL_VBOXGUEST_HGCM_DISCONNECT, &Info, sizeof(Info)); 70 70 if (RT_SUCCESS(rc)) 71 71 rc = Info.result; … … 95 95 VbglHGCMParmUInt32Set(&Msg.formats, 0); 96 96 97 int rc = VbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));97 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 98 98 if (RT_SUCCESS(rc)) 99 99 { … … 145 145 VbglHGCMParmUInt32Set(&Msg.size, 0); 146 146 147 int rc = VbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));147 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 148 148 if (RT_SUCCESS(rc)) 149 149 { … … 183 183 VbglHGCMParmUInt32Set(&Msg.formats, fFormats); 184 184 185 int rc = VbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));185 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 186 186 if (RT_SUCCESS(rc)) 187 187 rc = Msg.hdr.result; … … 212 212 VbglHGCMParmPtrSet(&Msg.ptr, pv, cb); 213 213 214 int rc = VbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));215 if (RT_SUCCESS(rc)) 216 rc = Msg.hdr.result; 217 return rc; 218 } 219 214 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg)); 215 if (RT_SUCCESS(rc)) 216 rc = Msg.hdr.result; 217 return rc; 218 } 219 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGR.cpp
r6469 r6470 28 28 29 29 30 int VbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cb, VMMDevRequestType enmReqType)30 int vbglR3GRAlloc(VMMDevRequestHeader **ppReq, uint32_t cb, VMMDevRequestType enmReqType) 31 31 { 32 32 VMMDevRequestHeader *pReq; … … 53 53 54 54 55 VBGLR3DECL(int) VbglR3GRPerform(VMMDevRequestHeader *pReq)55 VBGLR3DECL(int) vbglR3GRPerform(VMMDevRequestHeader *pReq) 56 56 { 57 return VbglR3DoIOCtl(VBOXGUEST_IOCTL_VMMREQUEST(pReq->size), pReq, pReq->size);57 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_VMMREQUEST(pReq->size), pReq, pReq->size); 58 58 } 59 59 60 60 61 void VbglR3GRFree(VMMDevRequestHeader *pReq)61 void vbglR3GRFree(VMMDevRequestHeader *pReq) 62 62 { 63 63 RTMemTmpFree(pReq); -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp
r6469 r6470 35 35 VBGLR3DECL(int) VbglR3InterruptEventWaits(void) 36 36 { 37 return VbglR3DoIOCtl(VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS, 0, 0);37 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS, 0, 0); 38 38 } 39 39 … … 59 59 { 60 60 size_t cbStep = RT_MIN(cb - off, STEP); 61 rc = VbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cbStep), (char *)pch + off, cbStep);61 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_LOG(cbStep), (char *)pch + off, cbStep); 62 62 } 63 63 #undef STEP … … 78 78 Info.u32OrMask = fOr; 79 79 Info.u32NotMask = fNot; 80 return VbglR3DoIOCtl(VBOXGUEST_IOCTL_CTL_FILTER_MASK, &Info, sizeof(Info));80 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_CTL_FILTER_MASK, &Info, sizeof(Info)); 81 81 } 82 82 … … 105 105 Req.eventAck = fEventAck; 106 106 Req.display = iDisplay; 107 int rc = VbglR3GRPerform(&Req.header);107 int rc = vbglR3GRPerform(&Req.header); 108 108 if (RT_SUCCESS(rc)) 109 109 { -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMouse.cpp
r6469 r6470 30 30 Req.pointerXPos = 0; 31 31 Req.pointerYPos = 0; 32 int rc = VbglR3GRPerform(&Req.header);32 int rc = vbglR3GRPerform(&Req.header); 33 33 if (RT_SUCCESS(rc)) 34 34 { … … 51 51 Req.pointerXPos = 0; 52 52 Req.pointerYPos = 0; 53 return VbglR3GRPerform(&Req.header);53 return vbglR3GRPerform(&Req.header); 54 54 } 55 55 -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSeamless.cpp
r6469 r6470 46 46 vmmdevInitRequest(&vmmreqGuestCaps.header, VMMDevReq_ReportGuestCapabilities); 47 47 vmmreqGuestCaps.caps = fState ? VMMDEV_GUEST_SUPPORTS_SEAMLESS : 0; 48 rc = VbglR3GRPerform(&vmmreqGuestCaps.header);48 rc = vbglR3GRPerform(&vmmreqGuestCaps.header); 49 49 #ifdef DEBUG 50 50 if (RT_SUCCESS(rc)) … … 71 71 waitEvent.u32TimeoutIn = 0; 72 72 waitEvent.u32EventMaskIn = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST; 73 rc = VbglR3DoIOCtl(VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent));73 rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_WAITEVENT, &waitEvent, sizeof(waitEvent)); 74 74 if (RT_SUCCESS(rc)) 75 75 { … … 82 82 vmmdevInitRequest(&seamlessChangeRequest.header, VMMDevReq_GetSeamlessChangeRequest); 83 83 seamlessChangeRequest.eventAck = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST; 84 rc = VbglR3GRPerform(&seamlessChangeRequest.header);84 rc = vbglR3GRPerform(&seamlessChangeRequest.header); 85 85 if (RT_SUCCESS(rc)) 86 86 { … … 102 102 * @param pRects list of visible rectangles on the guest display 103 103 * 104 * @todo A scatter-gather version of VbglR3GRPerform would be nice, so that we don't have104 * @todo A scatter-gather version of vbglR3GRPerform would be nice, so that we don't have 105 105 * to copy our rectangle and header data into a single structure and perform an 106 106 * additional allocation. … … 113 113 if (0 == cRects) 114 114 return VINF_SUCCESS; 115 rc = VbglR3GRAlloc((VMMDevRequestHeader **)&req,115 rc = vbglR3GRAlloc((VMMDevRequestHeader **)&req, 116 116 sizeof(VMMDevVideoSetVisibleRegion) + (cRects - 1) * sizeof(RTRECT), 117 117 VMMDevReq_VideoSetVisibleRegion); … … 120 120 req->cRect = cRects; 121 121 memcpy(&req->Rect, pRects, cRects * sizeof(RTRECT)); 122 rc = VbglR3GRPerform(&req->header);123 VbglR3GRFree(&req->header);122 rc = vbglR3GRPerform(&req->header); 123 vbglR3GRFree(&req->header); 124 124 if (RT_SUCCESS(rc)) 125 125 { -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibTime.cpp
r6469 r6470 29 29 vmmdevInitRequest(&Req.header, VMMDevReq_GetHostTime); 30 30 Req.time = UINT64_MAX; 31 int rc = VbglR3GRPerform(&Req.header);31 int rc = vbglR3GRPerform(&Req.header); 32 32 if (RT_SUCCESS(rc)) 33 33 RTTimeSpecSetMilli(pTime, (int64_t)Req.time); -
trunk/src/VBox/Additions/x11/xgraphics/vboxutils.c
r6469 r6470 106 106 TRACE_ENTRY (); 107 107 #ifdef RT_OS_SOLARIS 108 err = VbglR3GRPerform(hdrp);108 err = vbglR3GRPerform(hdrp); 109 109 if (RT_FAILURE(err)) 110 110 {
Note:
See TracChangeset
for help on using the changeset viewer.