• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef _UAPI_LINUX_ACCT_H
7 #define _UAPI_LINUX_ACCT_H
8 #include <linux/types.h>
9 #include <asm/param.h>
10 #include <asm/byteorder.h>
11 typedef __u16	comp_t;
12 typedef __u32	comp2_t;
13 #define ACCT_COMM	16
14 struct acct
15 {
16 	char		ac_flag;
17 	char		ac_version;
18 
19 	__u16		ac_uid16;
20 	__u16		ac_gid16;
21 	__u16		ac_tty;
22 	__u32		ac_btime;
23 	comp_t		ac_utime;
24 	comp_t		ac_stime;
25 	comp_t		ac_etime;
26 	comp_t		ac_mem;
27 	comp_t		ac_io;
28 	comp_t		ac_rw;
29 	comp_t		ac_minflt;
30 	comp_t		ac_majflt;
31 	comp_t		ac_swaps;
32 #if !defined(CONFIG_M68K) || !defined(__KERNEL__)
33 	__u16		ac_ahz;
34 #endif
35 	__u32		ac_exitcode;
36 	char		ac_comm[ACCT_COMM + 1];
37 	__u8		ac_etime_hi;
38 	__u16		ac_etime_lo;
39 	__u32		ac_uid;
40 	__u32		ac_gid;
41 };
42 struct acct_v3
43 {
44 	char		ac_flag;
45 	char		ac_version;
46 	__u16		ac_tty;
47 	__u32		ac_exitcode;
48 	__u32		ac_uid;
49 	__u32		ac_gid;
50 	__u32		ac_pid;
51 	__u32		ac_ppid;
52 	__u32		ac_btime;
53 #ifdef __KERNEL__
54 	__u32		ac_etime;
55 #else
56 	float		ac_etime;
57 #endif
58 	comp_t		ac_utime;
59 	comp_t		ac_stime;
60 	comp_t		ac_mem;
61 	comp_t		ac_io;
62 	comp_t		ac_rw;
63 	comp_t		ac_minflt;
64 	comp_t		ac_majflt;
65 	comp_t		ac_swaps;
66 	char		ac_comm[ACCT_COMM];
67 };
68 
69 #define AFORK		0x01
70 #define ASU		0x02
71 #define ACOMPAT		0x04
72 #define ACORE		0x08
73 #define AXSIG		0x10
74 #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
75 #define ACCT_BYTEORDER	0x80
76 #elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
77 #define ACCT_BYTEORDER	0x00
78 #else
79 #error unspecified endianness
80 #endif
81 #ifndef __KERNEL__
82 #define ACCT_VERSION	2
83 #define AHZ		(HZ)
84 #endif
85 #endif
86