]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] Add u64 printf to bootwrapper
authorGeoff Levand <geoffrey.levand@am.sony.com>
Fri, 15 Jun 2007 22:06:36 +0000 (08:06 +1000)
committerPaul Mackerras <paulus@samba.org>
Thu, 28 Jun 2007 09:16:48 +0000 (19:16 +1000)
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>
arch/powerpc/boot/stdio.c

index 0a9feeb983424f53e98b047609f510adab849f26..5b57800bbc675e11efabec8601a8b9000ce4c196 100644 (file)
@@ -190,7 +190,11 @@ int vsprintf(char *buf, const char *fmt, va_list args)
 
                /* get the conversion qualifier */
                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;
                        ++fmt;
                }
@@ -281,6 +285,10 @@ int vsprintf(char *buf, const char *fmt, va_list args)
                        num = va_arg(args, unsigned long);
                        if (flags & SIGN)
                                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') {
                        num = va_arg(args, size_t);
                } else if (qualifier == 'h') {