[PATCH] mtd: core: Fix printing partitions in hex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When printing the partition size with "0x" prefix the value has to
be displayed in hex.

Signed-off-by: Teresa Remmet <t.remmet@xxxxxxxxx>
---
 drivers/mtd/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index d2012b5f70d6..ae7818a189d7 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,
-- 
2.7.4


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux