Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2919
b: refs/heads/master
c: ab4af03
h: refs/heads/master
i:
  2917: 5a7689f
  2915: d2cafcb
  2911: 8c395b8
v: v3
  • Loading branch information
Greg Edwards authored and Linus Torvalds committed Jun 23, 2005
1 parent f0e180f commit a15c1a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dfe52244e004f5103478966cd88351feb5c50d79
refs/heads/master: ab4af03a4054bd78bcabfb2214c9597201beae35
12 changes: 10 additions & 2 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,8 +876,10 @@ void register_console(struct console * console)
break;
console->flags |= CON_ENABLED;
console->index = console_cmdline[i].index;
if (i == preferred_console)
if (i == selected_console) {
console->flags |= CON_CONSDEV;
preferred_console = selected_console;
}
break;
}

Expand All @@ -897,6 +899,8 @@ void register_console(struct console * console)
if ((console->flags & CON_CONSDEV) || console_drivers == NULL) {
console->next = console_drivers;
console_drivers = console;
if (console->next)
console->next->flags &= ~CON_CONSDEV;
} else {
console->next = console_drivers->next;
console_drivers->next = console;
Expand Down Expand Up @@ -937,10 +941,14 @@ int unregister_console(struct console * console)
/* If last console is removed, we re-enable picking the first
* one that gets registered. Without that, pmac early boot console
* would prevent fbcon from taking over.
*
* If this isn't the last console and it has CON_CONSDEV set, we
* need to set it on the next preferred console.
*/
if (console_drivers == NULL)
preferred_console = selected_console;

else if (console->flags & CON_CONSDEV)
console_drivers->flags |= CON_CONSDEV;

release_console_sem();
return res;
Expand Down

0 comments on commit a15c1a7

Please sign in to comment.