[PATCH] spl: add %z support for tiny-printf
Du Huanpeng
dhu at hodcarrier.org
Mon Feb 14 13:04:35 CET 2022
the %zx format are used in spl from files below:
lib/lzma/LzmaTools.c
common/malloc_simple.c
it results output like "... 0xx", "size=x" output,
treat '%z' as '%l' to support `ssize_t' type.
Signed-off-by: Du Huanpeng <dhu at hodcarrier.org>
---
lib/tiny-printf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 8fc7e48..4b65f72 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -228,7 +228,7 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
ch = *fmt++;
}
}
- if (ch == 'l') {
+ if (ch == 'l' || ch == 'z') {
ch = *(fmt++);
islong = true;
}
--
2.7.4
More information about the U-Boot
mailing list