summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2016-04-28 18:55:18 +0000
committerDmitry V. Levin <ldv@altlinux.org>2016-04-28 19:05:13 +0000
commit00beed61a43e042a37bcfbda71ed21d1e4918716 (patch)
tree8022be7f922c776c7935661c3f2629fc52937208 /defs.h
parent01c910ccc32ebc2c92fff68867f11e74102bf8e2 (diff)
downloadstrace-00beed61a43e042a37bcfbda71ed21d1e4918716.tar.gz
Introduce printflags64 function
This is necessary for the upcoming change of xlat.val type. * defs.h (printflags): Rename to printflags64, change type of integer argument to uint64_t. (printflags): New static inline function. * util.c (printflags): Rename to printflags64, change type of integer argument to uint64_t. Print it using PRIx64 format. Based on patch by Jeff Mahoney <jeffm@suse.com>.
Diffstat (limited to 'defs.h')
-rw-r--r--defs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/defs.h b/defs.h
index 33de96f44..eec0228bb 100644
--- a/defs.h
+++ b/defs.h
@@ -556,7 +556,7 @@ extern int printargs_u(struct tcb *);
extern int printargs_d(struct tcb *);
extern void addflags(const struct xlat *, uint64_t);
-extern int printflags(const struct xlat *, int, const char *);
+extern int printflags64(const struct xlat *, uint64_t, const char *);
extern const char *sprintflags64(const char *, const struct xlat *, uint64_t);
extern const char *sprintmode(int);
extern const char *sprinttime(time_t);
@@ -672,6 +672,12 @@ sprintflags(const char *prefix, const struct xlat *x, unsigned int flags)
return sprintflags64(prefix, x, flags);
}
+static inline int
+printflags(const struct xlat *x, unsigned int flags, const char *dflt)
+{
+ return printflags64(x, flags, dflt);
+}
+
static inline void
printxval64(const struct xlat *x, const uint64_t val, const char *dflt)
{