VirtualBox

Changeset 5891 in vbox


Ignore:
Timestamp:
Nov 30, 2007 2:07:25 PM (17 years ago)
Author:
vboxsync
Message:

Guest Additions: fixed todo from r26395 regarding IOCTL definitions on Linux

File:
1 edited

Legend:

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

    r5887 r5891  
    11381138
    11391139#elif defined(RT_OS_LINUX)
    1140 /* Note that we can't use the Linux header IOCtl macros directly, as they expect a "type"
    1141    argument, whereas we provide "sizeof(type)". */
    1142 /** @todo r=bird: That's not true. You can use _IOC just like SUPDRVIOC.h does (include linux/ioctl.h). That should work back to 2.0.x. */
     1140# include <linux/ioctl.h>
     1141/* Note that we can't use the Linux header _IOWR macro directly, as it expects
     1142   a "type" argument, whereas we provide "sizeof(type)". */
    11431143/* VBOXGUEST_IOCTL_CODE(Function, sizeof(type)) == _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, (type)) */
    1144 # define VBOXGUEST_IOCTL_CODE(Function, Size)   ( (3 << 30) | ('V' << 8) | (Function) | VBOXGUEST_IOCTL_FLAG | (Size << 16) )
    1145 /* VBOXGUEST_IOCTL_CODE_FAST(Function) == _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG) */
    1146 # define VBOXGUEST_IOCTL_CODE_FAST(Function)    ( 'V' << 8 | (Function) | VBOXGUEST_IOCTL_FLAG)
     1144# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOC(_IOC_READ|_IOC_WRITE, 'V', Function, Size)
     1145# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
    11471146
    11481147#elif 0 /* BSD style - needs some adjusting _IORW takes a type and not a size. */
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