summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@googlemail.com>2012-10-21 22:59:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-10-30 10:24:12 +0100
commit4d5fa6ca5c86bccc934ac8483167aa4f93f8601f (patch)
tree112ed7f8b209e46be558960d9db9bbc8c7328420 /lib
parentde053ed91c2b2ac05527f87acd0cfee0270a23a3 (diff)
downloadbarebox-4d5fa6ca5c86bccc934ac8483167aa4f93f8601f.tar.gz
barebox-4d5fa6ca5c86bccc934ac8483167aa4f93f8601f.tar.xz
progressbar: use __stringify in format string
Use stringify in format string for HASH_PER_LINE. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/show_progress.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/show_progress.c b/lib/show_progress.c
index d958a4468..bc067eac5 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");
}