mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mtd: core: Fix printing partitions in hex
@ 2018-06-06 11:28 Teresa Remmet
  2018-06-07  7:21 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Teresa Remmet @ 2018-06-06 11:28 UTC (permalink / raw)
  To: barebox

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>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: core: Fix printing partitions in hex
  2018-06-06 11:28 [PATCH] mtd: core: Fix printing partitions in hex Teresa Remmet
@ 2018-06-07  7:21 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2018-06-07  7:21 UTC (permalink / raw)
  To: Teresa Remmet; +Cc: barebox

On Wed, Jun 06, 2018 at 01:28:22PM +0200, Teresa Remmet wrote:
> 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>
> ---
>  drivers/mtd/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> 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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-07  7:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 11:28 [PATCH] mtd: core: Fix printing partitions in hex Teresa Remmet
2018-06-07  7:21 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox