Use printflags64 instead of printflags_long

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.
This commit is contained in:
Дмитрий Левин 2016-12-25 21:55:01 +00:00
parent 0eda4a0a4b
commit 9f8b29f1cd
5 changed files with 5 additions and 11 deletions

6
defs.h
View File

@ -782,12 +782,6 @@ printflags(const struct xlat *x, unsigned int flags, const char *dflt)
return printflags64(x, flags, 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 static inline int
printxval64(const struct xlat *x, const uint64_t val, const char *dflt) printxval64(const struct xlat *x, const uint64_t val, const char *dflt)
{ {

View File

@ -122,7 +122,7 @@ print_fcntl(struct tcb *tcp)
break; break;
case F_NOTIFY: case F_NOTIFY:
tprints(", "); tprints(", ");
printflags_long(notifyflags, tcp->u_arg[2], "DN_???"); printflags64(notifyflags, tcp->u_arg[2], "DN_???");
break; break;
case F_SETLEASE: case F_SETLEASE:
tprints(", "); tprints(", ");
@ -130,7 +130,7 @@ print_fcntl(struct tcb *tcp)
break; break;
case F_ADD_SEALS: case F_ADD_SEALS:
tprints(", "); tprints(", ");
printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???"); printflags64(f_seals, tcp->u_arg[2], "F_SEAL_???");
break; break;
case F_SETSIG: case F_SETSIG:
tprints(", "); tprints(", ");

2
numa.c
View File

@ -113,7 +113,7 @@ SYS_FUNC(get_mempolicy)
tprintf(", %lu, ", tcp->u_arg[2]); tprintf(", %lu, ", tcp->u_arg[2]);
printaddr(tcp->u_arg[3]); printaddr(tcp->u_arg[3]);
tprints(", "); tprints(", ");
printflags_long(mempolicyflags, tcp->u_arg[4], "MPOL_???"); printflags64(mempolicyflags, tcp->u_arg[4], "MPOL_???");
} }
return 0; return 0;
} }

2
perf.c
View File

@ -423,7 +423,7 @@ SYS_FUNC(perf_event_open)
(int) tcp->u_arg[1], (int) tcp->u_arg[1],
(int) tcp->u_arg[2], (int) tcp->u_arg[2],
(int) tcp->u_arg[3]); (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; return RVAL_DECODED | RVAL_FD;
} }

View File

@ -11,7 +11,7 @@ SYS_FUNC(sram_alloc)
/* size */ /* size */
tprintf("%lu, ", tcp->u_arg[0]); tprintf("%lu, ", tcp->u_arg[0]);
/* flags */ /* 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; return RVAL_DECODED | RVAL_HEX;
} }