Christopher Ferris | 37c3f3c | 2023-07-10 10:59:05 -0700 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_LINUX_USER_EVENTS_H |
| 20 | #define _UAPI_LINUX_USER_EVENTS_H |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/ioctl.h> |
| 23 | #define USER_EVENTS_SYSTEM "user_events" |
| 24 | #define USER_EVENTS_PREFIX "u:" |
| 25 | #define DYN_LOC(offset,size) ((size) << 16 | (offset)) |
| 26 | struct user_reg { |
| 27 | __u32 size; |
| 28 | __u8 enable_bit; |
| 29 | __u8 enable_size; |
| 30 | __u16 flags; |
| 31 | __u64 enable_addr; |
| 32 | __u64 name_args; |
| 33 | __u32 write_index; |
| 34 | } __attribute__((__packed__)); |
| 35 | struct user_unreg { |
| 36 | __u32 size; |
| 37 | __u8 disable_bit; |
| 38 | __u8 __reserved; |
| 39 | __u16 __reserved2; |
| 40 | __u64 disable_addr; |
| 41 | } __attribute__((__packed__)); |
| 42 | #define DIAG_IOC_MAGIC '*' |
| 43 | #define DIAG_IOCSREG _IOWR(DIAG_IOC_MAGIC, 0, struct user_reg *) |
| 44 | #define DIAG_IOCSDEL _IOW(DIAG_IOC_MAGIC, 1, char *) |
| 45 | #define DIAG_IOCSUNREG _IOW(DIAG_IOC_MAGIC, 2, struct user_unreg *) |
| 46 | #endif |