From 1a4b9c2062d53b04395c85743e68567e6d41e067 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 15 Oct 2008 22:02:02 -0700 Subject: [PATCH] --- yaml --- r: 114735 b: refs/heads/master c: 20036fdcaf05fac0a84ed81a56906493a7d822e2 h: refs/heads/master i: 114733: c3b6a58b7ac30e9586b13e04ad00a06f2889f5ed 114731: e9463badfc355211140e109be5a913044419c46b 114727: a2e37a325bbb954f3a394dc9c59221a3472d7b69 114719: 136de6280b984d252e6197b7a09bb3d72c2cc9ab v: v3 --- [refs] | 2 +- trunk/kernel/printk.c | 2 ++ trunk/lib/vsprintf.c | 12 ++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a29434db07fd..3eea5d683aa0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9536727ef696861b205834dd2e01456b91088cb7 +refs/heads/master: 20036fdcaf05fac0a84ed81a56906493a7d822e2 diff --git a/trunk/kernel/printk.c b/trunk/kernel/printk.c index c3ab51dc9faf..fbd94bdaa74f 100644 --- a/trunk/kernel/printk.c +++ b/trunk/kernel/printk.c @@ -593,6 +593,8 @@ static int have_callable_console(void) * * See also: * printf(3) + * + * See the vsnprintf() documentation for format string extensions over C99. */ asmlinkage int printk(const char *fmt, ...) diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index c399bc1093cb..4c6674a41ed9 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -565,6 +565,10 @@ static char *pointer(const char *fmt, char *buf, char *end, void *ptr, int field * @fmt: The format string to use * @args: Arguments for the format string * + * This function follows C99 vsnprintf, but has some extensions: + * %pS output the name of a text symbol + * %pF output the name of a function pointer + * * The return value is the number of characters which would * be generated for the given input, excluding the trailing * '\0', as per ISO C99. If you want to have the exact @@ -806,6 +810,8 @@ EXPORT_SYMBOL(vsnprintf); * * Call this function if you are already dealing with a va_list. * You probably want scnprintf() instead. + * + * See the vsnprintf() documentation for format string extensions over C99. */ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) { @@ -828,6 +834,8 @@ EXPORT_SYMBOL(vscnprintf); * generated for the given input, excluding the trailing null, * as per ISO C99. If the return is greater than or equal to * @size, the resulting string is truncated. + * + * See the vsnprintf() documentation for format string extensions over C99. */ int snprintf(char * buf, size_t size, const char *fmt, ...) { @@ -877,6 +885,8 @@ EXPORT_SYMBOL(scnprintf); * * Call this function if you are already dealing with a va_list. * You probably want sprintf() instead. + * + * See the vsnprintf() documentation for format string extensions over C99. */ int vsprintf(char *buf, const char *fmt, va_list args) { @@ -894,6 +904,8 @@ EXPORT_SYMBOL(vsprintf); * The function returns the number of characters written * into @buf. Use snprintf() or scnprintf() in order to avoid * buffer overflows. + * + * See the vsnprintf() documentation for format string extensions over C99. */ int sprintf(char * buf, const char *fmt, ...) {