]> granicus.if.org Git - strace/commitdiff
Use printxval64 instead of printxval_long
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 21:59:59 +0000 (21:59 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 21:59:59 +0000 (21:59 +0000)
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
fcntl.c
mtd.c
numa.c
or1k_atomic.c
sysmips.c
term.c

diff --git a/defs.h b/defs.h
index 248e33c9c41897fa91e7313c37a471d39c93bc10..9a1aee71f4efa9348aa9c6268d86865dc3174095 100644 (file)
--- 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 7d104668f1a5d627cad5bb6cd15c9e97ac0fd698..948862927f5698f93ab1550643bb8f19bc8ec228 100644 (file)
--- 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 eea030056027eda17aeab523cbe1edabe22876d1..d6abf4b17d99bf2f73479065ec3d4d47c10b5a44 100644 (file)
--- 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 a990685c1cbc8ff69fdaf4c27cdc83d624f0ab93..c05a3a6001d5c724e10e0475b41b629f4c787cd8 100644 (file)
--- 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]);
index 54d3a0d9b0795b1cace3c1448d38752adb612120..bb02e0e4c62d9697bfb226ab7450eb7355c0f12e 100644 (file)
@@ -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]);
index 47acfec76c9f3d1f4dd523fac0609b90806a96c3..25fd6687ff25e0001de7d5eb9144963f8e3c90a8 100644 (file)
--- 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 26af12377ea9ae9fb04549a657b8a88d68b67ecb..73f00d0663ad7fab7c23bf23f19539fd2b7ba12c 100644 (file)
--- 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: