VirtualBox

Changeset 6167 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Dec 21, 2007 10:37:13 AM (17 years ago)
Author:
vboxsync
Message:

Guest Additions: added a VBOXGUEST_IOCTL_NUMBER macro for Linux guests for dealing with variable size IOCtl codes; added VBOXGUEST_IOCTL_LOG

File:
1 edited

Legend:

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

    r6118 r6167  
    967967   a "type" argument, whereas we provide "sizeof(type)". */
    968968/* VBOXGUEST_IOCTL_CODE(Function, sizeof(type)) == _IOWR('V', (Function) | VBOXGUEST_IOCTL_FLAG, (type)) */
    969 # define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOC(_IOC_READ|_IOC_WRITE, 'V', Function, Size)
     969# define VBOXGUEST_IOCTL_CODE(Function, Size)   _IOC(_IOC_READ|_IOC_WRITE, 'V', (Function) | VBOXGUEST_IOCTL_FLAG, (Size))
    970970# define VBOXGUEST_IOCTL_CODE_FAST(Function)    _IO(  'V', (Function) | VBOXGUEST_IOCTL_FLAG)
     971
     972# define VBOXGUEST_IOCTL_NUMBER(Code)           (_IOC_NR((Code)) & ~VBOXGUEST_IOCTL_FLAG)
    971973
    972974#elif defined(RT_OS_SOLARIS)
     
    11121114# define VBOXGUEST_IOCTL_CLIPBOARD_CONNECT  VBOXGUEST_IOCTL_CODE(19, sizeof(uint32_t))
    11131115# define IOCTL_VBOXGUEST_CLIPBOARD_CONNECT  VBOXGUEST_IOCTL_CLIPBOARD_CONNECT
     1116/* This was defined after the new IOCTL scheme was created, so we do not need
     1117   the compatibility macro. */
     1118# define VBOXGUEST_IOCTL_LOG(Size)          VBOXGUEST_IOCTL_CODE(20, (Size))
    11141119#else
    11151120# define IOCTL_VBOXGUEST_HGCM_CONNECT      IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3072, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestHGCMConnectInfo))
     
    11171122# define IOCTL_VBOXGUEST_HGCM_CALL         IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3074, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestHGCMCallInfo))
    11181123# define IOCTL_VBOXGUEST_CLIPBOARD_CONNECT IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3075, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(uint32_t))
     1124# define VBOXGUEST_IOCTL_LOG(Size)         IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3076, METHOD_BUFFERED, FILE_WRITE_ACCESS, (Size))
    11191125#endif
    11201126
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