Re: [RFC] Recursive printk
From: Linus Torvalds
Date: Sat Dec 06 2008 - 18:25:40 EST
On Sun, 7 Dec 2008, Nick Andrew wrote:
>
> I agree completely. I was hoping somebody could tell me how to include
> '%v' in gcc's acceptable list, but it seems impossible. The alternative
> then is to use '%pV%s' which gcc _should_ like (I haven't tested it,
> but it seems reasonable) and reverse the order of the fmt and args
> in the function call arguments.
Don't do %pV%s, do just %pV, and pass it a pointer to a struct, something
like
struct va_format {
const char *fmt;
va_list va;
};
and make people who use this just always pass things around like that.
(Maybe use "va_list *va" to add another level of indirection if necessary)
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/