VirtualBox

Changeset 6353 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jan 15, 2008 9:17:05 AM (17 years ago)
Author:
vboxsync
Message:

Ioctl decoding fix in common r0 guest code and small change in logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r6033 r6353  
    10011001        static unsigned s_cErrors = 0;
    10021002        if (s_cErrors++ > 32)
    1003             LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: u32Client=%RX32\n", u32ClientId));
     1003            LogRel(("VBoxGuestCommonIOCtl: HGCM_CALL: Invalid handle. u32Client=%RX32\n", u32ClientId));
    10041004        return VERR_INVALID_HANDLE;
    10051005    }
     
    10191019            *pcbDataReturned = cbActual;
    10201020    }
     1021    Log(("VBoxGuestCommonIOCtl: HGCM_CALL: Failed. rc=%Rrc.\n", rc));
    10211022    return rc;
    10221023}
     
    11421143     */
    11431144    int rc = VINF_SUCCESS;
     1145#ifdef RT_OS_SOLARIS
     1146    /* The other way of determining the request type does not work on Solaris (and perhaps on Linux too)
     1147     * as the range between the request types overlap when comparing all bits of the function code...
     1148     */
     1149    if (VBOXGUEST_IOCTL_NUMBER(iFunction) == VBOXGUEST_IOCTL_NUMBER(VBOXGUEST_IOCTL_VMMREQUEST(0)))
     1150#else
    11441151    if (    iFunction >= VBOXGUEST_IOCTL_VMMREQUEST(0)
    11451152        &&  iFunction <= VBOXGUEST_IOCTL_VMMREQUEST(0xfff)) /** @todo find a better way to do this*/
     1153#endif
    11461154    {
    11471155        CHECKRET_MIN_SIZE("VMMREQUEST", sizeof(VMMDevRequestHeader));
     
    11521160     * This one is tricky and can be done later.
    11531161     */
     1162# ifdef RT_OS_SOLARIS
     1163    else if (VBOXGUEST_IOCTL_NUMBER(iFunction) == VBOXGUEST_IOCTL_NUMBER(VBOXGUEST_IOCTL_HGCM_CALL(0)))
     1164#else
    11541165    else if (   iFunction >= VBOXGUEST_IOCTL_HGCM_CALL(0)
    11551166             && iFunction <= VBOXGUEST_IOCTL_HGCM_CALL(0xfff))
     1167#endif
    11561168    {
    11571169        CHECKRET_MIN_SIZE("HGCM_CALL", sizeof(VBoxGuestHGCMCallInfo));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette