Commit 0aa97d6e authored by Geoff Levand's avatar Geoff Levand Committed by Paul Mackerras

[POWERPC] Add u64 printf to bootwrapper

Add support for the 'll' (long long) printf qualifier in the powerpc zImage
bootwrapper.  This is useful for bootwrapper debugging on 64 bit platforms.
Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 72d06895
...@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args) ...@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
/* get the conversion qualifier */ /* get the conversion qualifier */
qualifier = -1; qualifier = -1;
if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') { if (*fmt == 'l' && *(fmt + 1) == 'l') {
qualifier = 'q';
fmt += 2;
} else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L'
|| *fmt == 'Z') {
qualifier = *fmt; qualifier = *fmt;
++fmt; ++fmt;
} }
...@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, va_list args) ...@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, va_list args)
num = va_arg(args, unsigned long); num = va_arg(args, unsigned long);
if (flags & SIGN) if (flags & SIGN)
num = (signed long) num; num = (signed long) num;
} else if (qualifier == 'q') {
num = va_arg(args, unsigned long long);
if (flags & SIGN)
num = (signed long long) num;
} else if (qualifier == 'Z') { } else if (qualifier == 'Z') {
num = va_arg(args, size_t); num = va_arg(args, size_t);
} else if (qualifier == 'h') { } else if (qualifier == 'h') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment