#define XLAT_STYLE_VERBOSITY_MASK (XLAT_STYLE_RAW | XLAT_STYLE_ABBREV)
#define XLAT_STYLE_FORMAT_SHIFT 2
-#define XLAT_STYLE_FORMAT_MASK (1 << XLAT_STYLE_FORMAT_SHIFT)
+#define XLAT_STYLE_FORMAT_MASK (3 << XLAT_STYLE_FORMAT_SHIFT)
enum xlat_style {
/**
XLAT_STYLE_FMT_X = 0 << XLAT_STYLE_FORMAT_SHIFT,
XLAT_STYLE_FMT_U = 1 << XLAT_STYLE_FORMAT_SHIFT,
+ XLAT_STYLE_FMT_D = 2 << XLAT_STYLE_FORMAT_SHIFT,
};
extern enum xlat_style xlat_verbosity;
return printxvals_ex(val, dflt, XLAT_STYLE_FMT_U, x, NULL);
}
+static inline int
+printxval64_d(const struct xlat *x, const int64_t val, const char *dflt)
+{
+ return printxvals_ex(val, dflt, XLAT_STYLE_FMT_D, x, NULL);
+}
+
+static inline int
+printxval_d(const struct xlat *x, const int val, const char *dflt)
+{
+ return printxvals_ex(val, dflt, XLAT_STYLE_FMT_D, x, NULL);
+}
+
static inline void
tprint_iov(struct tcb *tcp, kernel_ulong_t len, kernel_ulong_t addr,
enum iov_decode decode_iov)
static char buf[sizeof(val) * 3];
switch (xlat_format(style)) {
+ case XLAT_STYLE_FMT_D:
+ xsprintf(buf, "%" PRId64, val);
+ break;
+
case XLAT_STYLE_FMT_U:
xsprintf(buf, "%" PRIu64, val);
break;