From: Dmitry V. Levin Date: Thu, 28 Apr 2016 18:19:27 +0000 (+0000) Subject: addflags: change type of integer argument to uint64_t X-Git-Tag: v4.12~250 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9146ebef867e4b0ccbfc1eea46d04fb1a30a8e7;p=strace 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 . --- diff --git a/defs.h b/defs.h index 2cd23979..1423770f 100644 --- a/defs.h +++ b/defs.h @@ -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); diff --git a/util.c b/util.c index 1e5aecc1..763fd112 100644 --- a/util.c +++ b/util.c @@ -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); } }