diff options
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8e75003d62f6..38e612e66da5 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -891,9 +891,15 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, | |||
891 | case 'U': | 891 | case 'U': |
892 | return uuid_string(buf, end, ptr, spec, fmt); | 892 | return uuid_string(buf, end, ptr, spec, fmt); |
893 | case 'V': | 893 | case 'V': |
894 | return buf + vsnprintf(buf, end > buf ? end - buf : 0, | 894 | { |
895 | ((struct va_format *)ptr)->fmt, | 895 | va_list va; |
896 | *(((struct va_format *)ptr)->va)); | 896 | |
897 | va_copy(va, *((struct va_format *)ptr)->va); | ||
898 | buf += vsnprintf(buf, end > buf ? end - buf : 0, | ||
899 | ((struct va_format *)ptr)->fmt, va); | ||
900 | va_end(va); | ||
901 | return buf; | ||
902 | } | ||
897 | case 'K': | 903 | case 'K': |
898 | /* | 904 | /* |
899 | * %pK cannot be used in IRQ context because its test | 905 | * %pK cannot be used in IRQ context because its test |