Re: [RFC PATCH v2 1/3] printk: Add function to set console to preferred console's driver

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

 



On (20/04/30 19:14), Alper Nebi Yasak wrote:
[..]
> +int update_console_to_preferred(void)
> +{
> +	struct console_cmdline *c = NULL;
> +	struct console *con = NULL;
> +	struct console *tmp = NULL;
> +
> +	if (preferred_console >= 0)
> +		c = &console_cmdline[preferred_console];
> +
> +	if (!c || !c->name[0])
> +		return 0;
> +
> +	for_each_console(con) {
> +		if (!con->next || !(con->next->flags & CON_ENABLED))
> +			continue;
> +		if (strcmp(c->name, con->next->name) != 0)
> +			continue;

This matches the consoles by exact name. Consoles can have aliases,
but matching by alias is rather complex and it has some side effects.

Let me Cc more people on this. VT has a console takeover logic,
I wonder if we can extend the takeover code somehow.

Daniel, any thoughts?

https://lore.kernel.org/lkml/20200430161438.17640-1-alpernebiyasak@xxxxxxxxx

	-ss



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux