]> granicus.if.org Git - strace/commit
kcmp: output fds using a separate function
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sat, 16 Sep 2017 01:02:16 +0000 (03:02 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 17 Sep 2017 12:04:11 +0000 (12:04 +0000)
commit76cf3b2a98366144fa8f64651ef4161c639476b7
treef77915b2bcb28e68d435debc2b6038fd8fe3e5ac
parent8cddc598da17250fb0230ad028274f39eb6ca306
kcmp: output fds using a separate function

This is a preparation for the future introduction of cross-NS PID
derivation, which would enable us to print fd information for fds
related to all processes, not just traced ones.

Note the change in output type for idx1/idx2 in KCMP_FILE command from
unsigned to int, it follows printfd output format.

* kcmp.c (printpidfd): New function.
(PRINT_FIELD_PIDFD): New macro.
(SYS_FUNC(kcmp)) <case KCMP_FILE>: Use printpidfd for printing
idx1/idx2, as they are fds, after all.
kcmp.c
tests/kcmp.c