]> granicus.if.org Git - strace/commit
Replace direct usage of err_name/errnoent with print_err
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 27 Sep 2018 05:35:32 +0000 (07:35 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 14 Aug 2019 11:22:32 +0000 (11:22 +0000)
commitd058acc5d12f7132d07a06e86be8bcdf7c5a0739
treeb8fc645a2bfa87824d17a0157900a944ad138ed8
parent98cec8b0cd5ba6ebd45292ed5696d3e1db8dece5
Replace direct usage of err_name/errnoent with print_err

Introduce print_err function that prints error number respecting current
xlat verbosity settings, and switch err_name/errnoent callers to use
this new function instead.

* defs.h (err_name): Remove.
(print_err): New declaration.
* print_fields.h (PRINT_FIELD_ERR_D, PRINT_FIELD_ERR_U): New macros.
* syscall.c (err_name): Add static qualifier, change argument type
to uint64_t.
(print_err): New function.
* keyctl.c (keyctl_reject_key): Use print_err for printing error
argument.
* net.c (print_get_error): Use print_err for printing err.
* numa.c (print_status): Use print_err for printing errno.
* netlink.c: Include "print_fields.h".
(decode_nlmsgerr): Use PRINT_FIELD_ERR_D for printing errno field.
* printsiginfo.c: Include "print_fields.h".
(print_si_info): Use PRINT_FIELD_ERR_U for printing si_errno field.
* ptrace_syscall_info.c (print_ptrace_syscall_info): Use
PRINT_FIELD_ERR_D for printing info.exit.rval.
* tests/pidfd_send_signal.c (main): Update expected output.
* tests/ptrace.c (main): Likewise.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
defs.h
keyctl.c
net.c
netlink.c
numa.c
print_fields.h
printsiginfo.c
ptrace_syscall_info.c
syscall.c
tests/pidfd_send_signal.c
tests/ptrace.c