fix regression from "vsprintf: unify the format decoding layer for its 3 users"
authorVegard Nossum <vegard.nossum@gmail.com>
Sat, 14 Mar 2009 11:08:50 +0000 (12:08 +0100)
committerIngo Molnar <mingo@elte.hu>
Sat, 14 Mar 2009 11:37:08 +0000 (12:37 +0100)
Jeremy Fitzhardinge reported:

> Change fef20d9c1380f04ba9492d6463148db07b413708, "vsprintf:
> unify the format decoding layer for its 3 users", causes a
> regression in xenbus which results in no devices getting
> attached to a new domain.

%.*s is broken - fix it.

Reported-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
lib/vsprintf.c

index dc16743..708e505 100644 (file)
@@ -843,7 +843,7 @@ precision:
                                spec->precision = 0;
                } else if (*fmt == '*') {
                        /* it's the next argument */
-                       spec->type = FORMAT_TYPE_WITDH;
+                       spec->type = FORMAT_TYPE_PRECISION;
                        return ++fmt - start;
                }
        }