devfs_fs.h
上传用户:szlgq88
上传日期:2009-04-28
资源大小:48287k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. #ifndef _LINUX_DEVFS_FS_H
  2. #define _LINUX_DEVFS_FS_H
  3. #include <linux/ioctl.h>
  4. #define DEVFSD_PROTOCOL_REVISION_KERNEL  5
  5. #define DEVFSD_IOCTL_BASE 'd'
  6. /*  These are the various ioctls  */
  7. #define DEVFSDIOC_GET_PROTO_REV         _IOR(DEVFSD_IOCTL_BASE, 0, int)
  8. #define DEVFSDIOC_SET_EVENT_MASK        _IOW(DEVFSD_IOCTL_BASE, 2, int)
  9. #define DEVFSDIOC_RELEASE_EVENT_QUEUE   _IOW(DEVFSD_IOCTL_BASE, 3, int)
  10. #define DEVFSDIOC_SET_DEBUG_MASK        _IOW(DEVFSD_IOCTL_BASE, 4, int)
  11. #define DEVFSD_NOTIFY_REGISTERED    0
  12. #define DEVFSD_NOTIFY_UNREGISTERED  1
  13. #define DEVFSD_NOTIFY_ASYNC_OPEN    2
  14. #define DEVFSD_NOTIFY_CLOSE         3
  15. #define DEVFSD_NOTIFY_LOOKUP        4
  16. #define DEVFSD_NOTIFY_CHANGE        5
  17. #define DEVFSD_NOTIFY_CREATE        6
  18. #define DEVFSD_NOTIFY_DELETE        7
  19. #define DEVFS_PATHLEN               1024 /*  Never change this otherwise the
  20.    binary interface will change   */
  21. struct devfsd_notify_struct { /*  Use native C types to ensure same types in kernel and user space     */
  22. unsigned int type; /*  DEVFSD_NOTIFY_* value                   */
  23. unsigned int mode; /*  Mode of the inode or device entry       */
  24. unsigned int major; /*  Major number of device entry            */
  25. unsigned int minor; /*  Minor number of device entry            */
  26. unsigned int uid; /*  Uid of process, inode or device entry   */
  27. unsigned int gid; /*  Gid of process, inode or device entry   */
  28. unsigned int overrun_count; /*  Number of lost events                   */
  29. unsigned int namelen; /*  Number of characters not including '' */
  30. /*  The device name MUST come last                                       */
  31. char devname[DEVFS_PATHLEN]; /*  This will be '' terminated            */
  32. };
  33. #endif /*  _LINUX_DEVFS_FS_H  */