From d69c27760c7c4212a146eef7666283d511c29afb Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 25 Dec 2016 21:59:59 +0000 Subject: [PATCH] Use printxval64 instead of printxval_long After the change of tcb.u_arg type from long to kernel_ureg_t it is safe to stop using printxval_long proxy and pass syscall arguments directly to printxval64. * defs.h (printxval_long): Remove. * fcntl.c (print_fcntl): Replace printxval_long with printxval64. * mtd.c (mtd_ioctl): Likewise. * numa.c (SYS_FUNC(mbind)): Likewise. * or1k_atomic.c [OR1K] (SYS_FUNC(or1k_atomic)): Likewise. * sysmips.c [MIPS] (SYS_FUNC(sysmips)): Likewise. * term.c (term_ioctl): Likewise. --- defs.h | 6 ------ fcntl.c | 2 +- mtd.c | 2 +- numa.c | 2 +- or1k_atomic.c | 2 +- sysmips.c | 2 +- term.c | 4 ++-- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/defs.h b/defs.h index 248e33c9..9a1aee71 100644 --- a/defs.h +++ b/defs.h @@ -794,12 +794,6 @@ printxval(const struct xlat *x, const unsigned int val, const char *dflt) return printxvals(val, dflt, x, NULL); } -static inline int -printxval_long(const struct xlat *x, const unsigned long val, const char *dflt) -{ - return printxvals(val, dflt, x, NULL); -} - static inline void tprint_iov(struct tcb *tcp, kernel_ureg_t len, kernel_ureg_t addr, enum iov_decode decode_iov) diff --git a/fcntl.c b/fcntl.c index 7d104668..94886292 100644 --- a/fcntl.c +++ b/fcntl.c @@ -126,7 +126,7 @@ print_fcntl(struct tcb *tcp) break; case F_SETLEASE: tprints(", "); - printxval_long(lockfcmds, tcp->u_arg[2], "F_???"); + printxval64(lockfcmds, tcp->u_arg[2], "F_???"); break; case F_ADD_SEALS: tprints(", "); diff --git a/mtd.c b/mtd.c index eea03005..d6abf4b1 100644 --- a/mtd.c +++ b/mtd.c @@ -285,7 +285,7 @@ MPERS_PRINTER_DECL(int, mtd_ioctl, struct tcb *const tcp, case MTDFILEMODE: tprints(", "); - printxval_long(mtd_file_mode_options, arg, "MTD_FILE_MODE_???"); + printxval64(mtd_file_mode_options, arg, "MTD_FILE_MODE_???"); break; case MEMGETBADBLOCK: diff --git a/numa.c b/numa.c index a990685c..c05a3a60 100644 --- a/numa.c +++ b/numa.c @@ -78,7 +78,7 @@ SYS_FUNC(mbind) { printaddr(tcp->u_arg[0]); tprintf(", %lu, ", tcp->u_arg[1]); - printxval_long(policies, tcp->u_arg[2], "MPOL_???"); + printxval64(policies, tcp->u_arg[2], "MPOL_???"); tprints(", "); print_nodemask(tcp, tcp->u_arg[3], tcp->u_arg[4]); tprintf(", %lu, ", tcp->u_arg[4]); diff --git a/or1k_atomic.c b/or1k_atomic.c index 54d3a0d9..bb02e0e4 100644 --- a/or1k_atomic.c +++ b/or1k_atomic.c @@ -44,7 +44,7 @@ SYS_FUNC(or1k_atomic) { - printxval_long(atomic_ops, tcp->u_arg[0], "???"); + printxval64(atomic_ops, tcp->u_arg[0], "???"); switch(tcp->u_arg[0]) { case OR1K_ATOMIC_SWAP: tprintf(", 0x%lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]); diff --git a/sysmips.c b/sysmips.c index 47acfec7..25fd6687 100644 --- a/sysmips.c +++ b/sysmips.c @@ -45,7 +45,7 @@ SYS_FUNC(sysmips) { - printxval_long(sysmips_operations, tcp->u_arg[0], "???"); + printxval64(sysmips_operations, tcp->u_arg[0], "???"); tprints(", "); switch (tcp->u_arg[0]) { diff --git a/term.c b/term.c index 26af1237..73f00d06 100644 --- a/term.c +++ b/term.c @@ -223,11 +223,11 @@ term_ioctl(struct tcb *const tcp, const unsigned int code, /* ioctls with a direct decodable arg */ case TCXONC: tprints(", "); - printxval_long(tcxonc_options, arg, "TC???"); + printxval64(tcxonc_options, arg, "TC???"); break; case TCFLSH: tprints(", "); - printxval_long(tcflsh_options, arg, "TC???"); + printxval64(tcflsh_options, arg, "TC???"); break; case TCSBRK: case TCSBRKP: -- 2.50.1