mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Aring <alex.aring@googlemail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] progressbar: use __stringify in format string
Date: Tue, 23 Oct 2012 08:25:11 +0200	[thread overview]
Message-ID: <20121023062511.GF27665@pengutronix.de> (raw)
In-Reply-To: <1350853147-9233-1-git-send-email-alex.aring@gmail.com>

On Sun, Oct 21, 2012 at 10:59:06PM +0200, Alexander Aring wrote:
> Use stringify in format string for HASH_PER_LINE.
> 
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>

Applied, thanks.

Sascha

> ---
>  lib/show_progress.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/show_progress.c b/lib/show_progress.c
> index d958a44..bc067ea 100644
> --- a/lib/show_progress.c
> +++ b/lib/show_progress.c
> @@ -20,6 +20,7 @@
>  #include <common.h>
>  #include <progress.h>
>  #include <asm-generic/div64.h>
> +#include <linux/stringify.h>
>  
>  #define HASHES_PER_LINE	65
>  
> @@ -56,7 +57,7 @@ void init_progression_bar(int max)
>  	progress_max = max;
>  	spin = 0;
>  	if (progress_max)
> -		printf("\t[%65s]\r\t[", "");
> +		printf("\t[%"__stringify(HASHES_PER_LINE)"s]\r\t[", "");
>  	else
>  		printf("\t");
>  }
> -- 
> 1.7.12.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

  parent reply	other threads:[~2012-10-23  6:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-21 20:59 Alexander Aring
2012-10-21 20:59 ` [PATCH] devfs-core: add writesize in mtd partition ioctl Alexander Aring
2012-10-23  6:25 ` Sascha Hauer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-10-20 11:15 [PATCH] progressbar: use __stringify in format string Alexander Aring
2012-10-20 12:13 ` Jean-Christophe PLAGNIOL-VILLARD

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=20121023062511.GF27665@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=alex.aring@googlemail.com \
    --cc=barebox@lists.infradead.org \
    /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