Skip to content

Commit 9f8b29f

Browse files
committed
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.
1 parent 0eda4a0 commit 9f8b29f

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

defs.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -782,12 +782,6 @@ printflags(const struct xlat *x, unsigned int flags, const char *dflt)
782782
return printflags64(x, flags, dflt);
783783
}
784784

785-
static inline int
786-
printflags_long(const struct xlat *x, unsigned long flags, const char *dflt)
787-
{
788-
return printflags64(x, flags, dflt);
789-
}
790-
791785
static inline int
792786
printxval64(const struct xlat *x, const uint64_t val, const char *dflt)
793787
{

fcntl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,15 @@ print_fcntl(struct tcb *tcp)
122122
break;
123123
case F_NOTIFY:
124124
tprints(", ");
125-
printflags_long(notifyflags, tcp->u_arg[2], "DN_???");
125+
printflags64(notifyflags, tcp->u_arg[2], "DN_???");
126126
break;
127127
case F_SETLEASE:
128128
tprints(", ");
129129
printxval_long(lockfcmds, tcp->u_arg[2], "F_???");
130130
break;
131131
case F_ADD_SEALS:
132132
tprints(", ");
133-
printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???");
133+
printflags64(f_seals, tcp->u_arg[2], "F_SEAL_???");
134134
break;
135135
case F_SETSIG:
136136
tprints(", ");

numa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ SYS_FUNC(get_mempolicy)
113113
tprintf(", %lu, ", tcp->u_arg[2]);
114114
printaddr(tcp->u_arg[3]);
115115
tprints(", ");
116-
printflags_long(mempolicyflags, tcp->u_arg[4], "MPOL_???");
116+
printflags64(mempolicyflags, tcp->u_arg[4], "MPOL_???");
117117
}
118118
return 0;
119119
}

perf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ SYS_FUNC(perf_event_open)
423423
(int) tcp->u_arg[1],
424424
(int) tcp->u_arg[2],
425425
(int) tcp->u_arg[3]);
426-
printflags_long(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???");
426+
printflags64(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???");
427427

428428
return RVAL_DECODED | RVAL_FD;
429429
}

sram_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ SYS_FUNC(sram_alloc)
1111
/* size */
1212
tprintf("%lu, ", tcp->u_arg[0]);
1313
/* flags */
14-
printflags_long(sram_alloc_flags, tcp->u_arg[1], "???_SRAM");
14+
printflags64(sram_alloc_flags, tcp->u_arg[1], "???_SRAM");
1515

1616
return RVAL_DECODED | RVAL_HEX;
1717
}

0 commit comments

Comments
 (0)