Re: kunit stopped working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (21/01/06 14:10), Petr Mladek wrote:
> > > 
> > > But I am not completely sure that it is the right solution.
> > 
> > Wow, hmm, puzzled. Why does it help?
> 
> I have been as well. But it seems that I got it, see below.

Thanks!

[..]
> 
> Alternative solution is to ignore ttynull as the fallback console
> in register_console(). I mean the following:

I personally would prefer a very explicit fix (IOW, the patch below),
rather than relying on some initcall trickery (which has already
failed on us)

> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index ffdd0dc7ec6d..cdb77903b0af 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2816,8 +2816,12 @@ void register_console(struct console *newcon)
>  	 *	See if we want to use this console driver. If we
>  	 *	didn't select a console we take the first one
>  	 *	that registers here.
> +	 *
> +	 *	Ignore ttynull console. It should be used only
> +	 *	when explicitly configured or as an ultimate
> +	 *	fallback when no better console gets registered at all.
>  	 */
> -	if (!has_preferred_console) {
> +	if (!has_preferred_console && strcmp(newcon->name, "ttynull") != 0) {
>  		if (newcon->index < 0)
>  			newcon->index = 0;
>  		if (newcon->setup == NULL ||

So IIUC in case of ttynull fallback (console= ) we still end up setting
CON_CONSDEV on nulltty console, but we do it in try_enable_new_console().

Feel free to add
Acked-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>

	-ss



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux