VirtualBox

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


Ignore:
Timestamp:
Jan 21, 2008 6:37:06 PM (17 years ago)
Author:
vboxsync
Message:

Use VBOXGUEST_IOCTL_STRIP_SIZE as indicated by #2591.

File:
1 edited

Legend:

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

    r6353 r6426  
    11431143     */
    11441144    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
    1151     if (    iFunction >= VBOXGUEST_IOCTL_VMMREQUEST(0)
    1152         &&  iFunction <= VBOXGUEST_IOCTL_VMMREQUEST(0xfff)) /** @todo find a better way to do this*/
    1153 #endif
     1145    if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_VMMREQUEST(0)))
    11541146    {
    11551147        CHECKRET_MIN_SIZE("VMMREQUEST", sizeof(VMMDevRequestHeader));
     
    11601152     * This one is tricky and can be done later.
    11611153     */
    1162 # ifdef RT_OS_SOLARIS
    1163     else if (VBOXGUEST_IOCTL_NUMBER(iFunction) == VBOXGUEST_IOCTL_NUMBER(VBOXGUEST_IOCTL_HGCM_CALL(0)))
    1164 #else
    1165     else if (   iFunction >= VBOXGUEST_IOCTL_HGCM_CALL(0)
    1166              && iFunction <= VBOXGUEST_IOCTL_HGCM_CALL(0xfff))
    1167 #endif
     1154    else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL(0)))
    11681155    {
    11691156        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