diff options
author | Joe Perches <joe@perches.com> | 2010-06-26 21:02:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-04 13:40:17 -0400 |
commit | 7db6f5fb65a82af03229eef104dc9899c5eecf33 (patch) | |
tree | fb7a83297d8bf2680df9616ebf58bec89229ff3b /include/linux/kernel.h | |
parent | e490c1defec4236a6a131fe2d13bf7ba787c02f8 (diff) |
vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
Add the ability to print a format and va_list from a structure pointer
Allows __dev_printk to be implemented as a single printk while
minimizing string space duplication.
%pV should not be used without some mechanism to verify the
format and argument use ala __attribute__(format (printf(...))).
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8317ec4b9f3b..01dfc05ef4ac 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -171,6 +171,11 @@ static inline void might_fault(void) | |||
171 | } | 171 | } |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | struct va_format { | ||
175 | const char *fmt; | ||
176 | va_list *va; | ||
177 | }; | ||
178 | |||
174 | extern struct atomic_notifier_head panic_notifier_list; | 179 | extern struct atomic_notifier_head panic_notifier_list; |
175 | extern long (*panic_blink)(long time); | 180 | extern long (*panic_blink)(long time); |
176 | NORET_TYPE void panic(const char * fmt, ...) | 181 | NORET_TYPE void panic(const char * fmt, ...) |