summaryrefslogtreecommitdiff
path: root/src/xlat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xlat.c')
-rw-r--r--src/xlat.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/xlat.c b/src/xlat.c
index fed9586b5..c45439917 100644
--- a/src/xlat.c
+++ b/src/xlat.c
@@ -28,16 +28,20 @@ sprint_xlat_val(uint64_t val, enum xlat_style style)
static char buf[sizeof(val) * 3];
switch (xlat_format(style)) {
- case XLAT_STYLE_FMT_D:
- xsprintf(buf, "%" PRId64, val);
+ case XLAT_STYLE_FMT_X:
+ xsprintf(buf, "%#" PRIx64, val);
break;
case XLAT_STYLE_FMT_U:
xsprintf(buf, "%" PRIu64, val);
break;
- case XLAT_STYLE_FMT_X:
- xsprintf(buf, "%#" PRIx64, val);
+ case XLAT_STYLE_FMT_D:
+ xsprintf(buf, "%" PRId64, val);
+ break;
+
+ case XLAT_STYLE_FMT_O:
+ xsprintf(buf, "%#" PRIo64, val);
break;
}