blob: aecc9f61d4115021cd9f53b1aa103d266975b632 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 Cheng655a7c02013-10-16 16:09:24 -070023#include <asm/byteorder.h>
24typedef __u16 comp_t;
25typedef __u32 comp2_t;
26#define ACCT_COMM 16
Tao Baod7db5942015-01-28 10:07:51 -080027struct acct {
28 char ac_flag;
29 char ac_version;
30 __u16 ac_uid16;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u16 ac_gid16;
32 __u16 ac_tty;
33 __u32 ac_btime;
34 comp_t ac_utime;
Tao Baod7db5942015-01-28 10:07:51 -080035 comp_t ac_stime;
36 comp_t ac_etime;
37 comp_t ac_mem;
38 comp_t ac_io;
Tao Baod7db5942015-01-28 10:07:51 -080039 comp_t ac_rw;
40 comp_t ac_minflt;
41 comp_t ac_majflt;
42 comp_t ac_swaps;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u16 ac_ahz;
44 __u32 ac_exitcode;
45 char ac_comm[ACCT_COMM + 1];
46 __u8 ac_etime_hi;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u16 ac_etime_lo;
48 __u32 ac_uid;
49 __u32 ac_gid;
Ben Cheng655a7c02013-10-16 16:09:24 -070050};
Tao Baod7db5942015-01-28 10:07:51 -080051struct acct_v3 {
52 char ac_flag;
53 char ac_version;
54 __u16 ac_tty;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u32 ac_exitcode;
56 __u32 ac_uid;
57 __u32 ac_gid;
58 __u32 ac_pid;
Tao Baod7db5942015-01-28 10:07:51 -080059 __u32 ac_ppid;
60 __u32 ac_btime;
61 float ac_etime;
62 comp_t ac_utime;
Tao Baod7db5942015-01-28 10:07:51 -080063 comp_t ac_stime;
64 comp_t ac_mem;
65 comp_t ac_io;
66 comp_t ac_rw;
Tao Baod7db5942015-01-28 10:07:51 -080067 comp_t ac_minflt;
68 comp_t ac_majflt;
69 comp_t ac_swaps;
70 char ac_comm[ACCT_COMM];
Ben Cheng655a7c02013-10-16 16:09:24 -070071};
72#define AFORK 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070073#define ASU 0x02
74#define ACOMPAT 0x04
75#define ACORE 0x08
76#define AXSIG 0x10
Elliott Hughes8cb52b02013-11-21 13:43:23 -080077#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
Ben Cheng655a7c02013-10-16 16:09:24 -070078#define ACCT_BYTEORDER 0x80
Tao Baod7db5942015-01-28 10:07:51 -080079#elif defined(__BYTE_ORDER)?__BYTE_ORDER==__LITTLE_ENDIAN:defined(__LITTLE_ENDIAN)
80#define ACCT_BYTEORDER 0x00
Ben Cheng655a7c02013-10-16 16:09:24 -070081#else
82#error unspecified endianness
83#endif
84#define ACCT_VERSION 2
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define AHZ (HZ)
86#endif