Skip to contentSkip to conversation

progressbar: use __stringify in format string

PATCH Applied Alexander Aring 2 participants 3 messages Oct 21, 2012 – Oct 23, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 progressbar: use __stringify in format string

Use stringify in format string for HASH_PER_LINE.

---
 lib/show_progress.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/show_progress.c +2 -1
index d958a44..bc067ea 100644
@@ -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");
 }
Signature · 7 lines
1.7.12.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

PATCH 1/1 devfs-core: add writesize in mtd partition ioctl

Add writesize in mtd partition MEMGETINFO ioctl.

---
 fs/devfs-core.c | 1 +
 1 file changed, 1 insertion(+)
fs/devfs-core.c +1 -0
index 2788fe7..0d2f75a 100644
@@ -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 */
Signature · 7 lines
1.7.12.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#2 lore raw
In reply to Alexander Aring
Quoted 3 lines · Alexander Aring

Use stringify in format string for HASH_PER_LINE.

Applied, thanks.

Sascha

Quoted 34 lines
---
 lib/show_progress.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/show_progress.c +2 -1
index d958a44..bc067ea 100644
@@ -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");
 }
Signature · 7 lines
1.7.12.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox