[U-Boot] [PATCH 33/33] SPL: tiny-printf: add "X" modifier

Ziyuan Xu xzy.xu at rock-chips.com
Mon May 15 06:07:27 UTC 2017


tiny-printf does not know about the "X" modifier so far, which print
all zero. The mmc driver use '0x%08X' to print command argument and
response.

Signed-off-by: Ziyuan Xu <xzy.xu at rock-chips.com>
---

 lib/tiny-printf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 0b04813..f1183d5 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -273,6 +273,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
 				}
 				break;
 			case 'x':
+			case 'X':
 				if (islong) {
 					num = va_arg(va, unsigned long);
 					div = 1UL << (sizeof(long) * 8 - 4);
-- 
2.7.4




More information about the U-Boot mailing list