aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-02-17 17:13:58 +0000
committerUlrich Drepper <drepper@redhat.com>2007-02-17 17:13:58 +0000
commit15c4b5a48b847f11e539dc8efdbbb4e0c56821ac (patch)
treeeb4564cb7c6765cdbe9c046cc216ac34490f756e
parent5e9e9c1472a6c20b52fe4bcc3e7ed2d0099150cd (diff)
downloadglibc-15c4b5a48b847f11e539dc8efdbbb4e0c56821ac.tar
glibc-15c4b5a48b847f11e539dc8efdbbb4e0c56821ac.tar.gz
glibc-15c4b5a48b847f11e539dc8efdbbb4e0c56821ac.tar.bz2
glibc-15c4b5a48b847f11e539dc8efdbbb4e0c56821ac.zip
[BZ #3818]
* sysdeps/unix/sysv/linux/sys/acct.h (struct acct_v3): Define.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/unix/sysv/linux/sys/acct.h72
2 files changed, 55 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 72a9f84893..0f8e7ba541 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2007-02-17 Ulrich Drepper <drepper@redhat.com>
+ [BZ #3818]
+ * sysdeps/unix/sysv/linux/sys/acct.h (struct acct_v3): Define.
+
[BZ #3745]
* locale/programs/ld-collate.c (handle_ellipsis): Fix generation
of names for ellipsises.
diff --git a/sysdeps/unix/sysv/linux/sys/acct.h b/sysdeps/unix/sysv/linux/sys/acct.h
index 9ee8564f70..47c63ebfb2 100644
--- a/sysdeps/unix/sysv/linux/sys/acct.h
+++ b/sysdeps/unix/sysv/linux/sys/acct.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,7 @@
#include <features.h>
+#include <endian.h>
#define __need_time_t
#include <time.h>
#include <sys/types.h>
@@ -38,25 +39,50 @@ __BEGIN_DECLS
typedef u_int16_t comp_t;
struct acct
- {
- char ac_flag; /* Accounting flags. */
- u_int16_t ac_uid; /* Accounting user ID. */
- u_int16_t ac_gid; /* Accounting group ID. */
- u_int16_t ac_tty; /* Controlling tty. */
- u_int32_t ac_btime; /* Beginning time. */
- comp_t ac_utime; /* Accounting user time. */
- comp_t ac_stime; /* Accounting system time. */
- comp_t ac_etime; /* Accounting elapsed time. */
- comp_t ac_mem; /* Accounting average memory usage. */
- comp_t ac_io; /* Accounting chars transferred. */
- comp_t ac_rw; /* Accounting blocks read or written. */
- comp_t ac_minflt; /* Accounting minor pagefaults. */
- comp_t ac_majflt; /* Accounting major pagefaults. */
- comp_t ac_swaps; /* Accounting number of swaps. */
- u_int32_t ac_exitcode; /* Accounting process exitcode. */
- char ac_comm[ACCT_COMM+1]; /* Accounting command name. */
- char ac_pad[10]; /* Accounting padding bytes. */
- };
+{
+ char ac_flag; /* Flags. */
+ u_int16_t ac_uid; /* Real user ID. */
+ u_int16_t ac_gid; /* Real group ID. */
+ u_int16_t ac_tty; /* Controlling terminal. */
+ u_int32_t ac_btime; /* Beginning time. */
+ comp_t ac_utime; /* User time. */
+ comp_t ac_stime; /* System time. */
+ comp_t ac_etime; /* Elapsed time. */
+ comp_t ac_mem; /* Average memory usage. */
+ comp_t ac_io; /* Chars transferred. */
+ comp_t ac_rw; /* Blocks read or written. */
+ comp_t ac_minflt; /* Minor pagefaults. */
+ comp_t ac_majflt; /* Major pagefaults. */
+ comp_t ac_swaps; /* Number of swaps. */
+ u_int32_t ac_exitcode; /* Process exitcode. */
+ char ac_comm[ACCT_COMM+1]; /* Command name. */
+ char ac_pad[10]; /* Padding bytes. */
+};
+
+
+struct acct_v3
+{
+ char ac_flag; /* Flags */
+ char ac_version; /* Always set to ACCT_VERSION */
+ u_int16_t ac_tty; /* Control Terminal */
+ u_int32_t ac_exitcode; /* Exitcode */
+ u_int32_t ac_uid; /* Real User ID */
+ u_int32_t ac_gid; /* Real Group ID */
+ u_int32_t ac_pid; /* Process ID */
+ u_int32_t ac_ppid; /* Parent Process ID */
+ u_int32_t ac_btime; /* Process Creation Time */
+ float ac_etime; /* Elapsed Time */
+ comp_t ac_utime; /* User Time */
+ comp_t ac_stime; /* System Time */
+ comp_t ac_mem; /* Average Memory Usage */
+ comp_t ac_io; /* Chars Transferred */
+ comp_t ac_rw; /* Blocks Read or Written */
+ comp_t ac_minflt; /* Minor Pagefaults */
+ comp_t ac_majflt; /* Major Pagefaults */
+ comp_t ac_swaps; /* Number of Swaps */
+ char ac_comm[ACCT_COMM]; /* Command Name */
+};
+
enum
{
@@ -66,6 +92,12 @@ enum
AXSIG = 0x10 /* Killed by a signal. */
};
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define ACCT_BYTEORDER 0x80 /* Accounting file is big endian. */
+#else
+# define ACCT_BYTEORDER 0x00 /* Accounting file is little endian. */
+#endif
+
#define AHZ 100