]> granicus.if.org Git - strace/commit
Fix decoding of fcntl/fcntl64 operation argument
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 16 May 2016 21:01:43 +0000 (21:01 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 16 May 2016 21:46:48 +0000 (21:46 +0000)
commit77086594ce4ff74a6afa5d4570d2a1dfbc5ae3c5
treee77a17226f7c029b71ec67a4f63f1a65903e2ad3
parent4811023e74adb61ca800b502f0a956992db2cde6
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.
fcntl.c
tests/fcntl.c
tests/fcntl64.c
tests/struct_flock.c