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:
parent
482bab05a0
commit
c9146ebef8
2
defs.h
2
defs.h
@ -555,7 +555,7 @@ extern int printargs(struct tcb *);
|
|||||||
extern int printargs_u(struct tcb *);
|
extern int printargs_u(struct tcb *);
|
||||||
extern int printargs_d(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 int printflags(const struct xlat *, int, const char *);
|
||||||
extern const char *sprintflags(const char *, const struct xlat *, int);
|
extern const char *sprintflags(const char *, const struct xlat *, int);
|
||||||
extern const char *sprintmode(int);
|
extern const char *sprintmode(int);
|
||||||
|
4
util.c
4
util.c
@ -303,7 +303,7 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
|
|||||||
* return # of flags printed.
|
* return # of flags printed.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
addflags(const struct xlat *xlat, int flags)
|
addflags(const struct xlat *xlat, uint64_t flags)
|
||||||
{
|
{
|
||||||
for (; xlat->str; xlat++) {
|
for (; xlat->str; xlat++) {
|
||||||
if (xlat->val && (flags & xlat->val) == xlat->val) {
|
if (xlat->val && (flags & xlat->val) == xlat->val) {
|
||||||
@ -312,7 +312,7 @@ addflags(const struct xlat *xlat, int flags)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (flags) {
|
if (flags) {
|
||||||
tprintf("|%#x", flags);
|
tprintf("|%#" PRIx64, flags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user