From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 5/9] vsprintf: add %w and %w support to print unit
Date: Thu, 2 Sep 2010 17:32:20 +0200 [thread overview]
Message-ID: <20100902153220.GR14214@pengutronix.de> (raw)
In-Reply-To: <20100902152933.GQ14214@pengutronix.de>
Hello,
On Thu, Sep 02, 2010 at 05:29:33PM +0200, Uwe Kleine-König wrote:
> Hello Jean-Christophe,
>
> On Thu, Sep 02, 2010 at 04:10:20PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Show a '%w' or %W thing.
> > This will show a frequency or byte at format xxx[.xxx] [ kMG]
> > the precision can not excess the base kMG of the current unit
> > otherwise it will be automatically reduce
> > if no precision is specified and there is rest we will use a default
> > precision of 3 as 66.667 M
> > base will be typically 1000 for Hz or B and 1024 for iB
> I see this used e.g. as:
>
> printk("%WiB", somevalue)
>
> right? hmm, what if somevalue is say 5? If I understand correctly the
> output then is: "5 iB".
[I forgot to complete this, sorry]
"5 iB" looks ugly, doesn't it? Do you care enough to fix that?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2010-09-02 15:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 14:10 [PATCH 0/9] preperation for sh adding Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 1/9] types.h: move __kernel_dev_t to include/linux/types.h Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 2/9] device: fix dev_name Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 3/9] stm8815: fix the uart device clock match Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 4/9] arm: move clkdev to drivers/clk Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 5/9] vsprintf: add %w and %w support to print unit Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 15:29 ` Uwe Kleine-König
2010-09-02 15:32 ` Uwe Kleine-König [this message]
[not found] ` <20100902155421.GB28968@game.jcrosoft.org>
2010-09-02 17:54 ` Uwe Kleine-König
2010-09-02 14:10 ` [PATCH 6/9] at91/clock: switch to %w for clock info printing Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 7/9] cfi_flash: use %W and IEEE 1541 format Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 8/9] use %W instead of size_human_readable and use " Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 14:10 ` [PATCH 9/9] clkdev: add print clk info command Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 15:22 ` Uwe Kleine-König
2010-09-02 19:40 ` [PATCH 0/9 V2] preperation for sh adding Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 1/9 V2] types.h: move __kernel_dev_t to include/linux/types.h Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 2/9 V2] device: fix dev_name Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 3/9 V2] stm8815: fix the uart device clock match Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 4/9 V2] arm: move clkdev to drivers/clk Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 5/9 V2] vsprintf: add %w and %w support to print unit Jean-Christophe PLAGNIOL-VILLARD
2010-09-03 18:34 ` Uwe Kleine-König
2010-09-02 19:41 ` [PATCH 6/9 V2] at91/clock: switch to %w for clock info printing Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 7/9 V2] cfi_flash: use %W and IEEE 1541 format Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 8/9 V2] use %W instead of size_human_readable and use " Jean-Christophe PLAGNIOL-VILLARD
2010-09-02 19:41 ` [PATCH 9/9 V2] clkdev: add print clk info command Jean-Christophe PLAGNIOL-VILLARD
2010-09-16 10:38 ` [PATCH 0/9 V2] preperation for sh adding Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100902153220.GR14214@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox