- Timestamp:
- Mar 3, 2015 11:48:06 PM (10 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
r54614 r54615 64 64 *******************************************************************************/ 65 65 #define VBOXGUEST_ACQUIRE_STYLE_EVENTS (VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST | VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST) 66 67 68 /*******************************************************************************69 * Structures and Typedefs *70 *******************************************************************************/71 /** Host flags to be updated by a given invocation of the72 * vboxGuestUpdateHostFlags() method. */73 /** @todo r=bird: Use RT_BIT_32 for the bits, preferably replace enum with74 * \#define. */75 enum76 {77 HostFlags_FilterMask = 1,78 HostFlags_MouseStatus = 4,79 HostFlags_All = 7,80 HostFlags_SizeHack = (unsigned)-181 };82 66 83 67 … … 1527 1511 static int vbgdIoCtl_GetVMMDevPort(PVBOXGUESTDEVEXT pDevExt, VBoxGuestPortInfo *pInfo, size_t *pcbDataReturned) 1528 1512 { 1529 LogFlow(("V bgdCommonIoCtl:GETVMMDEVPORT\n"));1513 LogFlow(("VBOXGUEST_IOCTL_GETVMMDEVPORT\n")); 1530 1514 1531 1515 pInfo->portAddress = pDevExt->IOPortBase; … … 1547 1531 int vbgdIoCtl_SetMouseNotifyCallback(PVBOXGUESTDEVEXT pDevExt, VBoxGuestMouseSetNotifyCallback *pNotify) 1548 1532 { 1549 LogFlow(("V bgdCommonIoCtl: SET_MOUSE_NOTIFY_CALLBACK\n"));1533 LogFlow(("VBOXGUEST_IOCTL_SET_MOUSE_NOTIFY_CALLBACK: pfnNotify=%p pvUser=%p\n", pNotify->pfnNotify, pNotify->pvUser)); 1550 1534 1551 1535 RTSpinlockAcquire(pDevExt->EventSpinlock); … … 1578 1562 pInfo->u32Result = VBOXGUEST_WAITEVENT_OK; 1579 1563 if (fReqEvents & ~((uint32_t)1 << iEvent)) 1580 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));1564 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut)); 1581 1565 else 1582 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));1566 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent)); 1583 1567 pSession->fPendingCancelWaitEvents = false; 1584 1568 return VINF_SUCCESS; … … 1610 1594 if (RT_UNLIKELY(iEvent < 0)) 1611 1595 { 1612 LogRel(("V bgdCommonIoCtl:WAITEVENT: Invalid input mask %#x!!\n", fReqEvents));1596 LogRel(("VBOXGUEST_IOCTL_WAITEVENT: Invalid input mask %#x!!\n", fReqEvents)); 1613 1597 return VERR_INVALID_PARAMETER; 1614 1598 } … … 1625 1609 { 1626 1610 pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT; 1627 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns VERR_TIMEOUT\n"));1611 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns VERR_TIMEOUT\n")); 1628 1612 return VERR_TIMEOUT; 1629 1613 } … … 1680 1664 pInfo->u32Result = VBOXGUEST_WAITEVENT_OK; 1681 1665 if (fReqEvents & ~((uint32_t)1 << iEvent)) 1682 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut));1666 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x\n", pInfo->u32EventFlagsOut)); 1683 1667 else 1684 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent));1668 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %#x/%d\n", pInfo->u32EventFlagsOut, iEvent)); 1685 1669 rc = VINF_SUCCESS; 1686 1670 } … … 1690 1674 pInfo->u32Result = VBOXGUEST_WAITEVENT_INTERRUPTED; 1691 1675 rc = VERR_INTERRUPTED; 1692 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns VERR_INTERRUPTED\n"));1676 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns VERR_INTERRUPTED\n")); 1693 1677 } 1694 1678 else if (rc == VERR_TIMEOUT) 1695 1679 { 1696 1680 pInfo->u32Result = VBOXGUEST_WAITEVENT_TIMEOUT; 1697 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns VERR_TIMEOUT (2)\n"));1681 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns VERR_TIMEOUT (2)\n")); 1698 1682 } 1699 1683 else … … 1701 1685 if (RT_SUCCESS(rc)) 1702 1686 { 1703 LogRelMax(32, ("V bgdCommonIoCtl:WAITEVENT: returns %Rrc but no events!\n", rc));1687 LogRelMax(32, ("VBOXGUEST_IOCTL_WAITEVENT: returns %Rrc but no events!\n", rc)); 1704 1688 rc = VERR_INTERNAL_ERROR; 1705 1689 } 1706 1690 pInfo->u32Result = VBOXGUEST_WAITEVENT_ERROR; 1707 LogFlow(("V bgdCommonIoCtl:WAITEVENT: returns %Rrc\n", rc));1691 LogFlow(("VBOXGUEST_IOCTL_WAITEVENT: returns %Rrc\n", rc)); 1708 1692 } 1709 1693 … … 1723 1707 bool fCancelledOne = false; 1724 1708 1725 LogFlow(("V bgdCommonIoCtl:CANCEL_ALL_WAITEVENTS\n"));1709 LogFlow(("VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS\n")); 1726 1710 1727 1711 /* … … 1756 1740 return VINF_SUCCESS; 1757 1741 } 1742 1758 1743 1759 1744 /** … … 1923 1908 const uint32_t cbMinSize = (uint32_t)vmmdevGetRequestSize(enmType); 1924 1909 1925 LogFlow(("V bgdCommonIoCtl: VMMREQUESTtype %d\n", pReqHdr->requestType));1910 LogFlow(("VBOXGUEST_IOCTL_VMMREQUEST: type %d\n", pReqHdr->requestType)); 1926 1911 1927 1912 if (cbReq < cbMinSize) 1928 1913 { 1929 LogRel(("V bgdCommonIoCtl:VMMREQUEST: invalid hdr size %#x, expected >= %#x; type=%#x!!\n",1914 LogRel(("VBOXGUEST_IOCTL_VMMREQUEST: invalid hdr size %#x, expected >= %#x; type=%#x!!\n", 1930 1915 cbReq, cbMinSize, enmType)); 1931 1916 return VERR_INVALID_PARAMETER; … … 1933 1918 if (cbReq > cbData) 1934 1919 { 1935 LogRel(("V bgdCommonIoCtl:VMMREQUEST: invalid size %#x, expected >= %#x (hdr); type=%#x!!\n",1920 LogRel(("VBOXGUEST_IOCTL_VMMREQUEST: invalid size %#x, expected >= %#x (hdr); type=%#x!!\n", 1936 1921 cbData, cbReq, enmType)); 1937 1922 return VERR_INVALID_PARAMETER; … … 1940 1925 if (RT_FAILURE(rc)) 1941 1926 { 1942 Log(("V bgdCommonIoCtl:VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n",1927 Log(("VBOXGUEST_IOCTL_VMMREQUEST: invalid header: size %#x, expected >= %#x (hdr); type=%#x; rc=%Rrc!!\n", 1943 1928 cbData, cbReq, enmType, rc)); 1944 1929 return rc; … … 1948 1933 if (RT_FAILURE(rc)) 1949 1934 { 1950 Log(("V bgdCommonIoCtl:VMMREQUEST: Operation not allowed! type=%#x rc=%Rrc\n", enmType, rc));1935 Log(("VBOXGUEST_IOCTL_VMMREQUEST: Operation not allowed! type=%#x rc=%Rrc\n", enmType, rc)); 1951 1936 return rc; 1952 1937 } … … 1962 1947 if (RT_FAILURE(rc)) 1963 1948 { 1964 Log(("V bgdCommonIoCtl:VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n",1949 Log(("VBOXGUEST_IOCTL_VMMREQUEST: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 1965 1950 cbReq, cbReq, rc)); 1966 1951 return rc; … … 1972 1957 1973 1958 rc = VbglGRPerform(pReqCopy); 1974 if ( 1975 && 1959 if ( RT_SUCCESS(rc) 1960 && RT_SUCCESS(pReqCopy->rc)) 1976 1961 { 1977 1962 Assert(rc != VINF_HGCM_ASYNC_EXECUTE); … … 1983 1968 } 1984 1969 else if (RT_FAILURE(rc)) 1985 Log(("V bgdCommonIoCtl:VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc));1970 Log(("VBOXGUEST_IOCTL_VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc)); 1986 1971 else 1987 1972 { 1988 Log(("V bgdCommonIoCtl:VMMREQUEST: request execution failed; VMMDev rc=%Rrc!\n", pReqCopy->rc));1973 Log(("VBOXGUEST_IOCTL_VMMREQUEST: request execution failed; VMMDev rc=%Rrc!\n", pReqCopy->rc)); 1989 1974 rc = pReqCopy->rc; 1990 1975 } … … 2058 2043 * Unlink, free and return. 2059 2044 */ 2060 if ( 2061 && 2062 && (!fInterruptible2063 ||rc != VERR_INTERRUPTED))2045 if ( RT_FAILURE(rc) 2046 && rc != VERR_TIMEOUT 2047 && ( !fInterruptible 2048 || rc != VERR_INTERRUPTED)) 2064 2049 LogRel(("vbgdHgcmAsyncWaitCallback: wait failed! %Rrc\n", rc)); 2065 2050 … … 2107 2092 * to deal with cancelled requests. 2108 2093 */ 2109 Log(("V bgdCommonIoCtl:HGCM_CONNECT: %.128s\n",2094 Log(("VBOXGUEST_IOCTL_HGCM_CONNECT: %.128s\n", 2110 2095 pInfo->Loc.type == VMMDevHGCMLoc_LocalHost || pInfo->Loc.type == VMMDevHGCMLoc_LocalHost_Existing 2111 2096 ? pInfo->Loc.u.host.achName : "<not local host>")); … … 2114 2099 if (RT_SUCCESS(rc)) 2115 2100 { 2116 Log(("V bgdCommonIoCtl:HGCM_CONNECT: u32Client=%RX32 result=%Rrc (rc=%Rrc)\n",2101 Log(("VBOXGUEST_IOCTL_HGCM_CONNECT: u32Client=%RX32 result=%Rrc (rc=%Rrc)\n", 2117 2102 pInfo->u32ClientID, pInfo->result, rc)); 2118 2103 if (RT_SUCCESS(pInfo->result)) … … 2134 2119 { 2135 2120 VBoxGuestHGCMDisconnectInfo Info; 2136 LogRelMax(32, ("V bgdCommonIoCtl:HGCM_CONNECT: too many HGCMConnect calls for one session!\n"));2121 LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_CONNECT: too many HGCMConnect calls for one session!\n")); 2137 2122 Info.result = 0; 2138 2123 Info.u32ClientID = pInfo->u32ClientID; … … 2169 2154 if (i >= RT_ELEMENTS(pSession->aHGCMClientIds)) 2170 2155 { 2171 LogRelMax(32, ("V bgdCommonIoCtl:HGCM_DISCONNECT: u32Client=%RX32\n", u32ClientId));2156 LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_DISCONNECT: u32Client=%RX32\n", u32ClientId)); 2172 2157 return VERR_INVALID_HANDLE; 2173 2158 } … … 2178 2163 * to deal with cancelled requests. 2179 2164 */ 2180 Log(("V bgdCommonIoCtl:HGCM_DISCONNECT: u32Client=%RX32\n", pInfo->u32ClientID));2165 Log(("VBOXGUEST_IOCTL_HGCM_DISCONNECT: u32Client=%RX32\n", pInfo->u32ClientID)); 2181 2166 rc = VbglR0HGCMInternalDisconnect(pInfo, vbgdHgcmAsyncWaitCallback, pDevExt, RT_INDEFINITE_WAIT); 2182 2167 if (RT_SUCCESS(rc)) 2183 2168 { 2184 LogFlow(("V bgdCommonIoCtl:HGCM_DISCONNECT: result=%Rrc\n", pInfo->result));2169 LogFlow(("VBOXGUEST_IOCTL_HGCM_DISCONNECT: result=%Rrc\n", pInfo->result)); 2185 2170 if (pcbDataReturned) 2186 2171 *pcbDataReturned = sizeof(*pInfo); … … 2212 2197 if (pInfo->cParms > 4096) /* (Just make sure it doesn't overflow the next check.) */ 2213 2198 { 2214 LogRel(("V bgdCommonIoCtl:HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms));2199 LogRel(("VBOXGUEST_IOCTL_HGCM_CALL: cParm=%RX32 is not sane\n", pInfo->cParms)); 2215 2200 return VERR_INVALID_PARAMETER; 2216 2201 } … … 2225 2210 if (cbData < cbActual) 2226 2211 { 2227 LogRel(("V bgdCommonIoCtl:HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n",2212 LogRel(("VBOXGUEST_IOCTL_HGCM_CALL: cbData=%#zx (%zu) required size is %#zx (%zu)\n", 2228 2213 cbData, cbData, cbActual, cbActual)); 2229 2214 return VERR_INVALID_PARAMETER; … … 2240 2225 if (RT_UNLIKELY(i >= RT_ELEMENTS(pSession->aHGCMClientIds))) 2241 2226 { 2242 LogRelMax(32, ("V bgdCommonIoCtl:HGCM_CALL: Invalid handle. u32Client=%RX32\n", u32ClientId));2227 LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_CALL: Invalid handle. u32Client=%RX32\n", u32ClientId)); 2243 2228 return VERR_INVALID_HANDLE; 2244 2229 } … … 2250 2235 * be interruptible (should add a flag for this later I guess). 2251 2236 */ 2252 LogFlow(("V bgdCommonIoCtl:HGCM_CALL: u32Client=%RX32\n", pInfo->u32ClientID));2237 LogFlow(("VBOXGUEST_IOCTL_HGCM_CALL: u32Client=%RX32\n", pInfo->u32ClientID)); 2253 2238 fFlags = !fUserData && pSession->R0Process == NIL_RTR0PROCESS ? VBGLR0_HGCMCALL_F_KERNEL : VBGLR0_HGCMCALL_F_USER; 2254 2239 uint32_t cbInfo = (uint32_t)(cbData - cbExtra); … … 2271 2256 if (RT_SUCCESS(rc)) 2272 2257 { 2273 LogFlow(("V bgdCommonIoCtl:HGCM_CALL: result=%Rrc\n", pInfo->result));2258 LogFlow(("VBOXGUEST_IOCTL_HGCM_CALL: result=%Rrc\n", pInfo->result)); 2274 2259 if (pcbDataReturned) 2275 2260 *pcbDataReturned = cbActual; … … 2279 2264 if ( rc != VERR_INTERRUPTED 2280 2265 && rc != VERR_TIMEOUT) 2281 LogRelMax(32, ("V bgdCommonIoCtl:HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));2266 LogRelMax(32, ("VBOXGUEST_IOCTL_HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc)); 2282 2267 else 2283 Log(("V bgdCommonIoCtl:HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc));2268 Log(("VBOXGUEST_IOCTL_HGCM_CALL: %s Failed. rc=%Rrc.\n", f32bit ? "32" : "64", rc)); 2284 2269 } 2285 2270 return rc; … … 2309 2294 int rc; 2310 2295 2311 LogFlow(("V bgdCommonIoCtl: CHECK_MEMORY_BALLOON\n"));2296 LogFlow(("VBOXGUEST_IOCTL_CHECK_BALLOON:\n")); 2312 2297 rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 2313 2298 AssertRCReturn(rc, rc); … … 2352 2337 } 2353 2338 else 2354 LogRel(("V bgdCommonIoCtl: CHECK_MEMORY_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc));2339 LogRel(("VBOXGUEST_IOCTL_CHECK_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc)); 2355 2340 VbglGRFree(&pReq->header); 2356 2341 } … … 2360 2345 2361 2346 RTSemFastMutexRelease(pDevExt->MemBalloon.hMtx); 2362 LogFlow(("V bgdCommonIoCtl: CHECK_MEMORY_BALLOON returns %Rrc\n", rc));2347 LogFlow(("VBOXGUEST_IOCTL_CHECK_BALLOON returns %Rrc\n", rc)); 2363 2348 return rc; 2364 2349 } … … 2380 2365 { 2381 2366 int rc; 2382 2383 LogFlow(("VbgdCommonIoCtl: CHANGE_BALLOON\n")); 2367 LogFlow(("VBOXGUEST_IOCTL_CHANGE_BALLOON: fInflate=%RTbool u64ChunkAddr=%#RX64\n", pInfo->fInflate, pInfo->u64ChunkAddr)); 2368 2384 2369 rc = RTSemFastMutexRequest(pDevExt->MemBalloon.hMtx); 2385 2370 AssertRCReturn(rc, rc); … … 2424 2409 VMMDevReqWriteCoreDump *pReq = NULL; 2425 2410 int rc; 2426 2427 LogFlow(("VbgdCommonIoCtl: WRITE_CORE_DUMP\n")); 2411 LogFlow(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP\n")); 2412 2428 2413 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump); 2429 if (RT_FAILURE(rc)) 2430 { 2431 Log(("VbgdCommonIoCtl: WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 2414 if (RT_SUCCESS(rc)) 2415 { 2416 pReq->fFlags = pInfo->fFlags; 2417 rc = VbglGRPerform(&pReq->header); 2418 if (RT_FAILURE(rc)) 2419 Log(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc)); 2420 2421 VbglGRFree(&pReq->header); 2422 } 2423 else 2424 Log(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP: failed to allocate %u (%#x) bytes to cache the request. rc=%Rrc!!\n", 2432 2425 sizeof(*pReq), sizeof(*pReq), rc)); 2433 return rc;2434 }2435 2436 pReq->fFlags = pInfo->fFlags;2437 rc = VbglGRPerform(&pReq->header);2438 if (RT_FAILURE(rc))2439 Log(("VbgdCommonIoCtl: WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc));2440 2441 VbglGRFree(&pReq->header);2442 2426 return rc; 2443 2427 } … … 2456 2440 static int vbgdIoCtl_Log(PVBOXGUESTDEVEXT pDevExt, const char *pch, size_t cbData, size_t *pcbDataReturned, bool fUserSession) 2457 2441 { 2458 NOREF(pch);2459 NOREF(cbData);2460 2442 if (pDevExt->fLoggingEnabled) 2461 2443 RTLogBackdoorPrintf("%.*s", cbData, pch); … … 2712 2694 static int vbgdIoCtl_CtlFilterMask(PVBOXGUESTDEVEXT pDevExt, PVBOXGUESTSESSION pSession, VBoxGuestFilterMaskInfo *pInfo) 2713 2695 { 2714 LogFlow(("V bgdCommonIoCtl: CTL_FILTER_MASKor=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask));2696 LogFlow(("VBOXGUEST_IOCTL_CTL_FILTER_MASK: or=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask)); 2715 2697 2716 2698 if ((pInfo->u32OrMask | pInfo->u32NotMask) & ~VMMDEV_EVENT_VALID_EVENT_MASK) 2717 2699 { 2718 Log(("V bgdCommonIoCtl: CTL_FILTER_MASKor=%#x not=%#x: Invalid masks!\n", pInfo->u32OrMask, pInfo->u32NotMask));2700 Log(("VBOXGUEST_IOCTL_CTL_FILTER_MASK: or=%#x not=%#x: Invalid masks!\n", pInfo->u32OrMask, pInfo->u32NotMask)); 2719 2701 return VERR_INVALID_PARAMETER; 2720 2702 } … … 2863 2845 { 2864 2846 int rc; 2865 LogFlow(("V bgdCommonIoCtl: CTL_FILTER_MASKfeatures=%#x\n", fFeatures));2847 LogFlow(("VBOXGUEST_IOCTL_SET_MOUSE_STATUS: features=%#x\n", fFeatures)); 2866 2848 2867 2849 if (fFeatures & ~VMMDEV_MOUSE_GUEST_MASK) … … 3205 3187 { 3206 3188 int rc; 3207 LogFlow(("V bgdCommonIoCtl: GUEST_CAPS_ACQUIREor=%#x not=%#x flags=%#x\n",3189 LogFlow(("VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE: or=%#x not=%#x flags=%#x\n", 3208 3190 pAcquire->u32OrMask, pAcquire->u32NotMask, pAcquire->enmFlags)); 3209 3191 … … 3323 3305 { 3324 3306 int rc; 3325 LogFlow(("V bgdCommonIoCtl: SET_GUEST_CAPABILITIESor=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask));3307 LogFlow(("VBOXGUEST_IOCTL_SET_GUEST_CAPABILITIES: or=%#x not=%#x\n", pInfo->u32OrMask, pInfo->u32NotMask)); 3326 3308 3327 3309 if (!((pInfo->u32OrMask | pInfo->u32NotMask) & ~VMMDEV_GUEST_CAPABILITIES_MASK)) … … 3494 3476 3495 3477 case VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS: 3496 if (cbData != 0) 3497 rc = VERR_INVALID_PARAMETER; 3478 CHECKRET_SIZE("CANCEL_ALL_WAITEVENTS", 0); 3498 3479 rc = vbgdIoCtl_CancelAllWaitEvents(pDevExt, pSession); 3499 3480 break; -
trunk/src/VBox/Additions/common/VBoxGuestLib/GenericRequest.cpp
r47294 r54615 37 37 if (!pReq || cbReq < sizeof (VMMDevRequestHeader)) 38 38 { 39 dprintf(("VbglGRVerify: Invalid parameter: pReq = %p, cbReq = % d\n", pReq, cbReq));39 dprintf(("VbglGRVerify: Invalid parameter: pReq = %p, cbReq = %zu\n", pReq, cbReq)); 40 40 return VERR_INVALID_PARAMETER; 41 41 } … … 43 43 if (pReq->size > cbReq) 44 44 { 45 dprintf(("VbglGRVerify: request size % d > buffer size %d\n", pReq->size, cbReq));45 dprintf(("VbglGRVerify: request size %u > buffer size %zu\n", pReq->size, cbReq)); 46 46 return VERR_INVALID_PARAMETER; 47 47 } … … 52 52 if (cbReq < cbReqExpected) 53 53 { 54 dprintf(("VbglGRVerify: buffer size % d < expected size %d\n", cbReq, cbReqExpected));54 dprintf(("VbglGRVerify: buffer size %zu < expected size %zu\n", cbReq, cbReqExpected)); 55 55 return VERR_INVALID_PARAMETER; 56 56 } … … 63 63 if (pReq->size != cbReqExpected) 64 64 { 65 dprintf(("VbglGRVerify: request size % d != expected size %d\n", pReq->size, cbReqExpected));65 dprintf(("VbglGRVerify: request size %u != expected size %zu\n", pReq->size, cbReqExpected)); 66 66 return VERR_INVALID_PARAMETER; 67 67 } … … 91 91 if (cbReq > VMMDEV_MAX_VMMDEVREQ_SIZE) 92 92 { 93 dprintf(("VbglGRVerify: VMMDevReq_LogString: buffer size % dtoo big\n", cbReq));93 dprintf(("VbglGRVerify: VMMDevReq_LogString: buffer size %zu too big\n", cbReq)); 94 94 return VERR_BUFFER_OVERFLOW; /* @todo is this error code ok? */ 95 95 } … … 97 97 else 98 98 { 99 dprintf(("VbglGRVerify: request size % d > buffer size %d\n", pReq->size, cbReq));99 dprintf(("VbglGRVerify: request size %u > buffer size %zu\n", pReq->size, cbReq)); 100 100 return VERR_IO_BAD_LENGTH; /* @todo is this error code ok? */ 101 101 }
Note:
See TracChangeset
for help on using the changeset viewer.