Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_LINUX_ACCT_H |
| 8 | #define _UAPI_LINUX_ACCT_H |
| 9 | #include <linux/types.h> |
| 10 | #include <asm/param.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #include <asm/byteorder.h> |
| 12 | typedef __u16 comp_t; |
| 13 | typedef __u32 comp2_t; |
| 14 | #define ACCT_COMM 16 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | struct acct { |
| 16 | char ac_flag; |
| 17 | char ac_version; |
| 18 | __u16 ac_uid16; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | __u16 ac_gid16; |
| 20 | __u16 ac_tty; |
| 21 | __u32 ac_btime; |
| 22 | comp_t ac_utime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | comp_t ac_stime; |
| 24 | comp_t ac_etime; |
| 25 | comp_t ac_mem; |
| 26 | comp_t ac_io; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | comp_t ac_rw; |
| 28 | comp_t ac_minflt; |
| 29 | comp_t ac_majflt; |
| 30 | comp_t ac_swaps; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u16 ac_ahz; |
| 32 | __u32 ac_exitcode; |
| 33 | char ac_comm[ACCT_COMM + 1]; |
| 34 | __u8 ac_etime_hi; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u16 ac_etime_lo; |
| 36 | __u32 ac_uid; |
| 37 | __u32 ac_gid; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 38 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | struct acct_v3 { |
| 40 | char ac_flag; |
| 41 | char ac_version; |
| 42 | __u16 ac_tty; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | __u32 ac_exitcode; |
| 44 | __u32 ac_uid; |
| 45 | __u32 ac_gid; |
| 46 | __u32 ac_pid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __u32 ac_ppid; |
| 48 | __u32 ac_btime; |
| 49 | float ac_etime; |
| 50 | comp_t ac_utime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | comp_t ac_stime; |
| 52 | comp_t ac_mem; |
| 53 | comp_t ac_io; |
| 54 | comp_t ac_rw; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | comp_t ac_minflt; |
| 56 | comp_t ac_majflt; |
| 57 | comp_t ac_swaps; |
| 58 | char ac_comm[ACCT_COMM]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | }; |
| 60 | #define AFORK 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | #define ASU 0x02 |
| 62 | #define ACOMPAT 0x04 |
| 63 | #define ACORE 0x08 |
| 64 | #define AXSIG 0x10 |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 65 | #define AGROUP 0x20 |
Elliott Hughes | 8cb52b0 | 2013-11-21 13:43:23 -0800 | [diff] [blame] | 66 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #define ACCT_BYTEORDER 0x80 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 68 | #elif defined(__BYTE_ORDER)?__BYTE_ORDER==__LITTLE_ENDIAN:defined(__LITTLE_ENDIAN) |
| 69 | #define ACCT_BYTEORDER 0x00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | #else |
| 71 | #error unspecified endianness |
| 72 | #endif |
| 73 | #define ACCT_VERSION 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | #define AHZ (HZ) |
| 75 | #endif |