diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2007-06-15 18:06:36 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-28 05:16:48 -0400 |
commit | 0aa97d6e420039fc4a6040acdf53e56e0f90c0f5 (patch) | |
tree | a96b6dd8946d8e5d025d07dfdf66f922fe56c5b8 /arch/powerpc/boot | |
parent | 72d068951ca3f5428a3149a604ea626d93eecffe (diff) |
[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: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r-- | arch/powerpc/boot/stdio.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/powerpc/boot/stdio.c b/arch/powerpc/boot/stdio.c index 0a9feeb98342..5b57800bbc67 100644 --- a/arch/powerpc/boot/stdio.c +++ b/arch/powerpc/boot/stdio.c | |||
@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args) | |||
190 | 190 | ||
191 | /* get the conversion qualifier */ | 191 | /* get the conversion qualifier */ |
192 | qualifier = -1; | 192 | qualifier = -1; |
193 | if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt =='Z') { | 193 | if (*fmt == 'l' && *(fmt + 1) == 'l') { |
194 | qualifier = 'q'; | ||
195 | fmt += 2; | ||
196 | } else if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' | ||
197 | || *fmt == 'Z') { | ||
194 | qualifier = *fmt; | 198 | qualifier = *fmt; |
195 | ++fmt; | 199 | ++fmt; |
196 | } | 200 | } |
@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, va_list args) | |||
281 | num = va_arg(args, unsigned long); | 285 | num = va_arg(args, unsigned long); |
282 | if (flags & SIGN) | 286 | if (flags & SIGN) |
283 | num = (signed long) num; | 287 | num = (signed long) num; |
288 | } else if (qualifier == 'q') { | ||
289 | num = va_arg(args, unsigned long long); | ||
290 | if (flags & SIGN) | ||
291 | num = (signed long long) num; | ||
284 | } else if (qualifier == 'Z') { | 292 | } else if (qualifier == 'Z') { |
285 | num = va_arg(args, size_t); | 293 | num = va_arg(args, size_t); |
286 | } else if (qualifier == 'h') { | 294 | } else if (qualifier == 'h') { |