addflags: change type of integer argument to uint64_t

This is necessary for the upcoming change of xlat.val type.
All users of addflags are already prepared for this change.

* defs.h (addflags): Change type of integer argument to uint64_t.
* util.c (addflags): Likewise.  Print it using PRIx64 format.
Based on patch by Jeff Mahoney <jeffm@suse.com>.
This commit is contained in:
Дмитрий Левин 2016-04-28 18:19:27 +00:00
parent 482bab05a0
commit c9146ebef8
2 changed files with 3 additions and 3 deletions

2
defs.h
View File

@ -555,7 +555,7 @@ extern int printargs(struct tcb *);
extern int printargs_u(struct tcb *);
extern int printargs_d(struct tcb *);
extern void addflags(const struct xlat *, int);
extern void addflags(const struct xlat *, uint64_t);
extern int printflags(const struct xlat *, int, const char *);
extern const char *sprintflags(const char *, const struct xlat *, int);
extern const char *sprintmode(int);

4
util.c
View File

@ -303,7 +303,7 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
* return # of flags printed.
*/
void
addflags(const struct xlat *xlat, int flags)
addflags(const struct xlat *xlat, uint64_t flags)
{
for (; xlat->str; xlat++) {
if (xlat->val && (flags & xlat->val) == xlat->val) {
@ -312,7 +312,7 @@ addflags(const struct xlat *xlat, int flags)
}
}
if (flags) {
tprintf("|%#x", flags);
tprintf("|%#" PRIx64, flags);
}
}