[Devel] [RFC rh7 v4] ve/tty: vt -- Implement per VE support for console and terminals
Andrey Ryabinin
aryabinin at odin.com
Fri Aug 21 09:00:13 PDT 2015
On 08/21/2015 06:22 PM, Cyrill Gorcunov wrote:
> On 08/21/2015 05:15 PM, Vladimir Davydov wrote:
>>> +#define vtty_printk(fmt, ...) \
>>> + printk("vtty: %20s: %4d: " fmt, \
>>> + __func__, __LINE__, ##__VA_ARGS__)
>>> +#define vtty_printk_one(__tty) \
>>> + vtty_printk("tty %p idx %2d cnt %2d fl 0x%-8lx\n", \
>>> + (__tty), (__tty)->index, (__tty)->count, (__tty)->flags)
>>> +#define vtty_printk_pair(__tty) \
>>> + vtty_printk("tty %p idx %2d cnt %2d fl 0x%-8lx " \
>>> + "link %p idx %2d cnt %2d fl 0x%-8lx\n", \
>>> + (__tty), (__tty)->index, (__tty)->count, (__tty)->flags, \
>>> + (__tty)->link, (__tty)->link ? (__tty)->link->index : -1, \
>>> + (__tty)->link ? (__tty)->link->count : -1, \
>>> + (__tty)->link ? (__tty)->link->flags : -1ul)
>>
>> tty_io.c uses pr_debug. Why should we be different?
>
> Because if you run kernel with "debug" by now it would spam the log
> too much ;/ Also I would like to not print all this even in debug
> mode but only when it's explicitly requested on compile time because
> frankly there is no much point in spamming the kernel.
>
AFAIR "debug" in kernel command line doesn't enable pr_debug() messages.
pr_debug() works if file was compiled with '#define DEBUG' or if
these messages were enabled in runtime (you need CONFIG_DYNAMIC_DEBUG=y for that,
see Documentation/dynamic-debug-howto.txt).
So, it sounds like that pr_debug() is exactly what you need ;)
More information about the Devel
mailing list