mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] progressbar: use __stringify in format string
@ 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 ` [PATCH] progressbar: use __stringify in format string Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Aring @ 2012-10-21 20:59 UTC (permalink / raw)
  To: barebox

Use stringify in format string for HASH_PER_LINE.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH] devfs-core: add writesize in mtd partition ioctl
@ 2012-10-23  9:00 Alexander Aring
  2012-10-24  7:49 ` Sascha Hauer
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Aring @ 2012-10-23  9:00 UTC (permalink / raw)
  To: barebox

Add writesize in mtd partition MEMGETINFO ioctl.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 fs/devfs-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 2788fe7..0d2f75a 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -136,6 +136,7 @@ static int partition_ioctl(struct cdev *cdev, int request, void *buf)
 			user->flags	= cdev->mtd->flags;
 			user->size	= cdev->mtd->size;
 			user->erasesize	= cdev->mtd->erasesize;
+			user->writesize	= cdev->mtd->writesize;
 			user->oobsize	= cdev->mtd->oobsize;
 			user->mtd	= cdev->mtd;
 			/* The below fields are obsolete */
-- 
1.8.0


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

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

end of thread, other threads:[~2012-10-24  7:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-21 20:59 [PATCH] progressbar: use __stringify in format string Alexander Aring
2012-10-21 20:59 ` [PATCH] devfs-core: add writesize in mtd partition ioctl Alexander Aring
2012-10-23  6:25 ` [PATCH] progressbar: use __stringify in format string Sascha Hauer
2012-10-23  9:00 [PATCH] devfs-core: add writesize in mtd partition ioctl Alexander Aring
2012-10-24  7:49 ` Sascha Hauer

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