diff options
| author | Tim Schmielau <tim@physik3.uni-rostock.de> | 2004-08-01 20:09:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-01 20:09:36 -0700 |
| commit | 357fbac90d6c0755ce7fab16d64bf3c8f8077940 (patch) | |
| tree | 7c9174c939421ba51cc88028423ff991a8648414 /kernel | |
| parent | f9d21ae77239647093e15c0239dd9c381cd090a8 (diff) | |
[PATCH] Fix BSD accounting cross-platform compatibility
BSD accounting cross-platform compatibility is a new feature of 2.6.8 and
thus not crucial, but it'd be nice not to have kernels writing wrong file
formats out in the wild.
The endianness detection logic I wanted to suppose for userspace turned out
to be bogus. So just do it the simple way and store endianness info
together with the version number.
Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/acct.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index e55e7bba861e..daf23c4efab4 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -398,7 +398,7 @@ static void do_acct_process(long exitcode, struct file *file) */ memset((caddr_t)&ac, 0, sizeof(acct_t)); - ac.ac_version = ACCT_VERSION; + ac.ac_version = ACCT_VERSION | ACCT_BYTEORDER; strlcpy(ac.ac_comm, current->comm, sizeof(ac.ac_comm)); elapsed = jiffies_64_to_AHZ(get_jiffies_64() - current->start_time); @@ -441,8 +441,7 @@ static void do_acct_process(long exitcode, struct file *file) old_encode_dev(tty_devnum(current->signal->tty)) : 0; read_unlock(&tasklist_lock); - /* ABYTESEX is always set to allow byte order detection */ - ac.ac_flag = ABYTESEX; + ac.ac_flag = 0; if (current->flags & PF_FORKNOEXEC) ac.ac_flag |= AFORK; if (current->flags & PF_SUPERPRIV) |
