diff options
author | jhb <jhb@FreeBSD.org> | 2015-10-01 17:28:07 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-10-01 17:28:07 +0000 |
commit | c57d8fb993f96281d9407b5b272bb6b0b9159dc7 (patch) | |
tree | 3e7949ae3821d5ac7abbcee9d6cd1c94bf7e79e2 /usr.bin/truss | |
parent | a7454f81fa2cbc27ce370c021a56b90700ca5dc2 (diff) | |
download | FreeBSD-src-c57d8fb993f96281d9407b5b272bb6b0b9159dc7.zip FreeBSD-src-c57d8fb993f96281d9407b5b272bb6b0b9159dc7.tar.gz |
- Remove extra integer argument from truncate() and ftruncate(). This is
probably fallout from the removal of the extra padding argument before
off_t in 7. However, that padding still exists for 32-bit powerpc, so
use QUAD_ALIGN.
- Fix QUAD_ALIGN to be zero for powerpc64. It should only be set to 1
for 32-bit platforms that add padding to align 64-bit arguments.
Diffstat (limited to 'usr.bin/truss')
-rw-r--r-- | usr.bin/truss/syscalls.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index f46a2e1..187f40d 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); #include "syscall.h" /* 64-bit alignment on 32-bit platforms. */ -#ifdef __powerpc__ +#if !defined(__LP64__) && defined(__powerpc__) #define QUAD_ALIGN 1 #else #define QUAD_ALIGN 0 @@ -320,10 +320,10 @@ static struct syscall syscalls[] = { .args = { { PipeFds | OUT, 0 } } }, { .name = "pipe2", .ret_type = 1, .nargs = 2, .args = { { Ptr, 0 }, { Open, 1 } } }, - { .name = "truncate", .ret_type = 1, .nargs = 3, - .args = { { Name | IN, 0 }, { Int | IN, 1 }, { Quad | IN, 2 } } }, - { .name = "ftruncate", .ret_type = 1, .nargs = 3, - .args = { { Int | IN, 0 }, { Int | IN, 1 }, { Quad | IN, 2 } } }, + { .name = "truncate", .ret_type = 1, .nargs = 2, + .args = { { Name | IN, 0 }, { Quad | IN, 1 + QUAD_ALIGN } } }, + { .name = "ftruncate", .ret_type = 1, .nargs = 2, + .args = { { Int | IN, 0 }, { Quad | IN, 1 + QUAD_ALIGN } } }, { .name = "kill", .ret_type = 1, .nargs = 2, .args = { { Int | IN, 0 }, { Signal | IN, 1 } } }, { .name = "munmap", .ret_type = 1, .nargs = 2, |