lkml.org 
[lkml]   [2003]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Kernel printk format string compression: C syntax problem
From
Date
On Fri, 2003-06-06 at 10:27, Timothy Miller wrote:

> printk( "EIP\200\3164x:[<\3168lx>] CPU\200%d\n" ,0xffff &
> regs->xcs,regs->eip, (current_thread_info()->cpu));
>
> GCC 3.0.4 makes the following complaint:
>
> arch/i386/kernel/process.c:173: warning: too many arguments for format
>
> What I believe is happening is that where I have the escape code "\316"
> concatenated with the literal "8", the compiler is seeing it as "\3168"
> and doesn't want to take it.

No. Look at the __attribute__ on printk in include/linux/kernel.h. GCC
believes that printk takes a printf-style format string as its first
argument, but you've mangled the string so that the number of format
specifiers doesn't match the number of arguments.

<b

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.058 / U:1.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site