VirtualBox

Changeset 6424 in vbox for trunk/include/VBox


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

Added VBOXGUEST_IOCTL_STRIP_SIZE (see #2591).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r6422 r6424  
    984984# define VBOXGUEST_IOCTL_CATEGORY_FAST              0xc3 /**< Also defined in VBoxGuestA-os2.asm. */
    985985# define VBOXGUEST_IOCTL_CODE_FAST(Function)        ((unsigned char)(Function))
     986# define VBOXGUEST_IOCTL_STRIP_SIZE(Function)       (Function)
    986987
    987988#elif defined(RT_OS_LINUX)
     
    992993# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOC(_IOC_READ|_IOC_WRITE, 'V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))
    993994# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
     995# define VBOXGUEST_IOCTL_STRIP_SIZE(Function)   ((Function) - _IOC_SIZE((Function)))
    994996
    995997/** @todo r=bird: Please remove. See discussion in xTracker and elsewhere; VBOXGUEST_IOCTL_STRIP_SIZE is all we need here and it must be defined everywhere. */
     
    10021004# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOWRN('V', (Function) | VBOXGUEST_IOCTL_FLAG, sizeof(VBGLBIGREQ))
    10031005# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
     1006# define VBOXGUEST_IOCTL_STRIP_SIZE(Function)   (Function)
    10041007#else
    10051008# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOWRN('V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))
    10061009# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
     1010# define VBOXGUEST_IOCTL_STRIP_SIZE(Function)   ((Function) & ~(IOCPARM_MASK << 16))
    10071011
    10081012/** @todo r=bird: Please remove. See discussion in xTracker and elsewhere; VBOXGUEST_IOCTL_STRIP_SIZE is all we need here and it must be defined everywhere. */
     
    10151019# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IORW('V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))
    10161020# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
     1021# define VBOXGUEST_IOCTL_STRIP_SIZE(Function)   ((Function) - IOCPARM_LEN((Function)))
    10171022
    10181023#else
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