[PATCH 3/7] Rename print_pid_fd -> printfd_pid_tracee_ns
Ákos Uzonyi
uzonyi.akos at gmail.com
Wed Apr 22 18:06:20 UTC 2020
To avoid confusion with the new printfd_pid fucntion.
defs.h: Rename print_pid_fd -> printfd_pid_tracee_ns.
kcmp.c: Rename print_pid_fd -> printfd_pid_tracee_ns.
pidfd_getfd.c: Rename print_pid_fd -> printfd_pid_tracee_ns.
util.c: Rename print_pid_fd -> printfd_pid_tracee_ns.
Signed-off-by: Uzonyi Ákos <uzonyi.akos at gmail.com>
---
defs.h | 2 +-
kcmp.c | 8 ++++----
pidfd_getfd.c | 2 +-
util.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/defs.h b/defs.h
index 94535a30..39985bbe 100644
--- a/defs.h
+++ b/defs.h
@@ -1039,7 +1039,7 @@ extern void printfd(struct tcb *, int);
* Print file descriptor fd owned by process with ID pid (from the PID NS
* of the tracee the descriptor tcp). This is a stub.
*/
-extern void print_pid_fd(struct tcb *tcp, pid_t pid, int fd);
+extern void printfd_pid_tracee_ns(struct tcb *tcp, pid_t pid, int fd);
extern void print_sockaddr(const void *sa, int len);
extern bool
print_inet_addr(int af, const void *addr, unsigned int len, const char *var_name);
diff --git a/kcmp.c b/kcmp.c
index 91d62f3f..6819265b 100644
--- a/kcmp.c
+++ b/kcmp.c
@@ -19,7 +19,7 @@ struct strace_kcmp_epoll_slot {
#define PRINT_FIELD_PIDFD(prefix_, where_, field_, tcp_, pid_) \
do { \
STRACE_PRINTF("%s%s=", (prefix_), #field_); \
- print_pid_fd((tcp_), (pid_), (where_).field_); \
+ printfd_pid_tracee_ns((tcp_), (pid_), (where_).field_); \
} while (0)
SYS_FUNC(kcmp)
@@ -36,9 +36,9 @@ SYS_FUNC(kcmp)
switch (type) {
case KCMP_FILE:
tprints(", ");
- print_pid_fd(tcp, pid1, idx1);
+ printfd_pid_tracee_ns(tcp, pid1, idx1);
tprints(", ");
- print_pid_fd(tcp, pid1, idx2);
+ printfd_pid_tracee_ns(tcp, pid1, idx2);
break;
@@ -46,7 +46,7 @@ SYS_FUNC(kcmp)
struct strace_kcmp_epoll_slot slot;
tprints(", ");
- print_pid_fd(tcp, pid1, idx1);
+ printfd_pid_tracee_ns(tcp, pid1, idx1);
tprints(", ");
if (umove_or_printaddr(tcp, idx2, &slot))
diff --git a/pidfd_getfd.c b/pidfd_getfd.c
index c5c40ae6..8461b8f4 100644
--- a/pidfd_getfd.c
+++ b/pidfd_getfd.c
@@ -15,7 +15,7 @@ SYS_FUNC(pidfd_getfd)
printfd(tcp, (int) tcp->u_arg[0]);
/* int fd */
tprints(", ");
- print_pid_fd(tcp, (int) tcp->u_arg[0], (int) tcp->u_arg[1]);
+ printfd_pid_tracee_ns(tcp, (int) tcp->u_arg[0], (int) tcp->u_arg[1]);
/* unsigned int flags */
tprintf(", %#x", (unsigned int) tcp->u_arg[2]);
diff --git a/util.c b/util.c
index 9539fbb6..3f562efc 100644
--- a/util.c
+++ b/util.c
@@ -639,7 +639,7 @@ printfd(struct tcb *tcp, int fd)
}
void
-print_pid_fd(struct tcb *tcp, pid_t pid, int fd)
+printfd_pid_tracee_ns(struct tcb *tcp, pid_t pid, int fd)
{
/*
* TODO: We want to have the same formatting as printfd here,
--
2.26.1
More information about the Strace-devel
mailing list