diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2016-05-16 21:01:43 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2016-05-16 21:46:48 +0000 |
commit | 77086594ce4ff74a6afa5d4570d2a1dfbc5ae3c5 (patch) | |
tree | e77a17226f7c029b71ec67a4f63f1a65903e2ad3 /tests/fcntl.c | |
parent | 4811023e74adb61ca800b502f0a956992db2cde6 (diff) | |
download | strace-77086594ce4ff74a6afa5d4570d2a1dfbc5ae3c5.tar.gz |
Fix decoding of fcntl/fcntl64 operation argument
Consistently treat operation argument of fcntl/fcntl64 syscalls as int
to match the kernel behaviour.
* fcntl.c (print_fcntl, SYS_FUNC(fcntl), SYS_FUNC(fcntl64)): Assign
2nd argument of syscall to a variable of type unsigned int
and use it in all subsequent checks and lookups.
* tests/struct_flock.c (invoke_test_syscall): New function.
(test_flock_einval, test_flock): Use it.
* tests/fcntl.c (test_flock64_einval): Use it.
* tests/fcntl64.c (test_flock64_einval, test_flock64): Use it.
Diffstat (limited to 'tests/fcntl.c')
-rw-r--r-- | tests/fcntl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/fcntl.c b/tests/fcntl.c index dfad530ac..1ea83e148 100644 --- a/tests/fcntl.c +++ b/tests/fcntl.c @@ -44,7 +44,7 @@ test_flock64_einval(const int cmd, const char *name) .l_start = 0xdefaced1facefeed, .l_len = 0xdefaced2cafef00d }; - syscall(TEST_SYSCALL_NR, 0, cmd, &fl); + invoke_test_syscall(cmd, &fl); printf("%s(0, %s, %p) = %s\n", TEST_SYSCALL_STR, name, &fl, EINVAL_STR); } |