Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -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_ACCT_H |
| 20 | #define _UAPI_LINUX_ACCT_H |
| 21 | #include <linux/types.h> |
| 22 | #include <asm/param.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <asm/byteorder.h> |
| 24 | typedef __u16 comp_t; |
| 25 | typedef __u32 comp2_t; |
| 26 | #define ACCT_COMM 16 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | struct acct { |
| 28 | char ac_flag; |
| 29 | char ac_version; |
| 30 | __u16 ac_uid16; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u16 ac_gid16; |
| 32 | __u16 ac_tty; |
| 33 | __u32 ac_btime; |
| 34 | comp_t ac_utime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | comp_t ac_stime; |
| 36 | comp_t ac_etime; |
| 37 | comp_t ac_mem; |
| 38 | comp_t ac_io; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | comp_t ac_rw; |
| 40 | comp_t ac_minflt; |
| 41 | comp_t ac_majflt; |
| 42 | comp_t ac_swaps; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __u16 ac_ahz; |
| 44 | __u32 ac_exitcode; |
| 45 | char ac_comm[ACCT_COMM + 1]; |
| 46 | __u8 ac_etime_hi; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u16 ac_etime_lo; |
| 48 | __u32 ac_uid; |
| 49 | __u32 ac_gid; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | struct acct_v3 { |
| 52 | char ac_flag; |
| 53 | char ac_version; |
| 54 | __u16 ac_tty; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | __u32 ac_exitcode; |
| 56 | __u32 ac_uid; |
| 57 | __u32 ac_gid; |
| 58 | __u32 ac_pid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u32 ac_ppid; |
| 60 | __u32 ac_btime; |
| 61 | float ac_etime; |
| 62 | comp_t ac_utime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | comp_t ac_stime; |
| 64 | comp_t ac_mem; |
| 65 | comp_t ac_io; |
| 66 | comp_t ac_rw; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | comp_t ac_minflt; |
| 68 | comp_t ac_majflt; |
| 69 | comp_t ac_swaps; |
| 70 | char ac_comm[ACCT_COMM]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | }; |
| 72 | #define AFORK 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 73 | #define ASU 0x02 |
| 74 | #define ACOMPAT 0x04 |
| 75 | #define ACORE 0x08 |
| 76 | #define AXSIG 0x10 |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 77 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 78 | #define ACCT_BYTEORDER 0x80 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | #elif defined(__BYTE_ORDER)?__BYTE_ORDER==__LITTLE_ENDIAN:defined(__LITTLE_ENDIAN) |
| 80 | #define ACCT_BYTEORDER 0x00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | #else |
| 82 | #error unspecified endianness |
| 83 | #endif |
| 84 | #define ACCT_VERSION 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 85 | #define AHZ (HZ) |
| 86 | #endif |