summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeresa Remmet <t.remmet@phytec.de>2018-06-06 13:28:22 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-07 09:21:01 +0200
commitd5c94e7a482e92ae5fe2f81b4fc148b517506e89 (patch)
tree85db84ed41fa9c0d969cf8692145a7e3bada5805
parent03f2a17b10d060ba545cb8e280c1092b5bfdae29 (diff)
downloadbarebox-d5c94e7a482e92ae5fe2f81b4fc148b517506e89.tar.gz
barebox-d5c94e7a482e92ae5fe2f81b4fc148b517506e89.tar.xz
mtd: core: Fix printing partitions in hex
When printing the partition size with "0x" prefix the value has to be displayed in hex. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mtd/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index d2012b5f70..ae7818a189 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -473,7 +473,7 @@ static char *print_size(uint64_t s)
return basprintf("%lldM", s >> 20);
if (!(s & ((1 << 10) - 1)))
return basprintf("%lldk", s >> 10);
- return basprintf("0x%lld", s);
+ return basprintf("0x%llx", s);
}
static int print_part(char *buf, int bufsize, struct mtd_info *mtd, uint64_t last_ofs,