]> granicus.if.org Git - strace/commitdiff
Use printflags64 instead of printflags_long
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 21:55:01 +0000 (21:55 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 21:55:01 +0000 (21:55 +0000)
After the change of tcb.u_arg type from long to kernel_ureg_t it is safe
to stop using printflags_long proxy and pass syscall arguments directly
to printflags64.

* defs.h (printflags_long): Remove.
* fcntl.c (print_fcntl): Replace printflags_long with printflags64.
* numa.c (SYS_FUNC(get_mempolicy)): Likewise.
* perf.c (SYS_FUNC(perf_event_open)): Likewise.
* sram_alloc.c [BFIN] (SYS_FUNC(sram_alloc)): Likewise.

defs.h
fcntl.c
numa.c
perf.c
sram_alloc.c

diff --git a/defs.h b/defs.h
index 86c26f70b84c95effdd8107d72ca66f330208085..248e33c9c41897fa91e7313c37a471d39c93bc10 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -782,12 +782,6 @@ printflags(const struct xlat *x, unsigned int flags, const char *dflt)
        return printflags64(x, flags, dflt);
 }
 
-static inline int
-printflags_long(const struct xlat *x, unsigned long flags, const char *dflt)
-{
-       return printflags64(x, flags, dflt);
-}
-
 static inline int
 printxval64(const struct xlat *x, const uint64_t val, const char *dflt)
 {
diff --git a/fcntl.c b/fcntl.c
index f9379e62c07dcb01b870617e975e53f2b54ad411..7d104668f1a5d627cad5bb6cd15c9e97ac0fd698 100644 (file)
--- a/fcntl.c
+++ b/fcntl.c
@@ -122,7 +122,7 @@ print_fcntl(struct tcb *tcp)
                break;
        case F_NOTIFY:
                tprints(", ");
-               printflags_long(notifyflags, tcp->u_arg[2], "DN_???");
+               printflags64(notifyflags, tcp->u_arg[2], "DN_???");
                break;
        case F_SETLEASE:
                tprints(", ");
@@ -130,7 +130,7 @@ print_fcntl(struct tcb *tcp)
                break;
        case F_ADD_SEALS:
                tprints(", ");
-               printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???");
+               printflags64(f_seals, tcp->u_arg[2], "F_SEAL_???");
                break;
        case F_SETSIG:
                tprints(", ");
diff --git a/numa.c b/numa.c
index af5b70aefa6ef321415cac49d21f3905000f552b..a990685c1cbc8ff69fdaf4c27cdc83d624f0ab93 100644 (file)
--- a/numa.c
+++ b/numa.c
@@ -113,7 +113,7 @@ SYS_FUNC(get_mempolicy)
                tprintf(", %lu, ", tcp->u_arg[2]);
                printaddr(tcp->u_arg[3]);
                tprints(", ");
-               printflags_long(mempolicyflags, tcp->u_arg[4], "MPOL_???");
+               printflags64(mempolicyflags, tcp->u_arg[4], "MPOL_???");
        }
        return 0;
 }
diff --git a/perf.c b/perf.c
index f6e6a32d0ca9d354d9b7f117cc898cde67f95c68..b01e593e83ba13fe5e080e0c225c7c96685abcac 100644 (file)
--- a/perf.c
+++ b/perf.c
@@ -423,7 +423,7 @@ SYS_FUNC(perf_event_open)
                (int) tcp->u_arg[1],
                (int) tcp->u_arg[2],
                (int) tcp->u_arg[3]);
-       printflags_long(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???");
+       printflags64(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???");
 
        return RVAL_DECODED | RVAL_FD;
 }
index 969e10eeb4188ec53095d16ecbb5812eccd38003..922746bbc6d3755c4ff16b9dc785ab78eedf34f6 100644 (file)
@@ -11,7 +11,7 @@ SYS_FUNC(sram_alloc)
        /* size */
        tprintf("%lu, ", tcp->u_arg[0]);
        /* flags */
-       printflags_long(sram_alloc_flags, tcp->u_arg[1], "???_SRAM");
+       printflags64(sram_alloc_flags, tcp->u_arg[1], "???_SRAM");
 
        return RVAL_DECODED | RVAL_HEX;
 }