[coreboot] New patch to review for coreboot: 0a0261a Implement %zu / %zd in printk
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Thu May 24 02:07:08 CEST 2012
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1043
-gerrit
commit 0a0261a3840f353ae35d752fadf537d72631149e
Author: Stefan Reinauer <reinauer at chromium.org>
Date: Tue May 15 13:28:07 2012 -0700
Implement %zu / %zd in printk
The SPI drivers from u-boot make heavy use of %zu/%zd (size_t/ssize_t).
Implement this in our printk implementation so we get useful output.
Change-Id: I91798ff4f28b9c3cd4db204c7ec503596d247dcd
Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
src/console/vtxprintf.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index a370e5f..28c5a60 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -170,7 +170,7 @@ repeat:
/* get the conversion qualifier */
qualifier = -1;
- if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L') {
+ if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'z') {
qualifier = *fmt;
++fmt;
if (*fmt == 'l') {
@@ -218,7 +218,6 @@ repeat:
field_width, precision, flags);
continue;
-
case 'n':
if (qualifier == 'L') {
long long *ip = va_arg(args, long long *);
@@ -265,6 +264,8 @@ repeat:
num = va_arg(args, unsigned long long);
} else if (qualifier == 'l') {
num = va_arg(args, unsigned long);
+ } else if (qualifier == 'z') {
+ num = va_arg(args, size_t);
} else if (qualifier == 'h') {
num = (unsigned short) va_arg(args, int);
if (flags & SIGN)
More information about the coreboot
mailing list