Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30299
b: refs/heads/master
c: 4ee1acc
h: refs/heads/master
i:
  30297: ba7ce17
  30295: 8316ea7
v: v3
  • Loading branch information
David Hollister authored and Linus Torvalds committed Jun 26, 2006
1 parent 6b1e552 commit 5e68616
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 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: 6dbde380ca525bbfedd65e11402f345e1d64cba9
refs/heads/master: 4ee1acce49d616e0e3fbff76fa1dea0c7350535d
26 changes: 17 additions & 9 deletions trunk/drivers/char/vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ int __init vty_init(void)

int take_over_console(const struct consw *csw, int first, int last, int deflt)
{
int i, j = -1;
int i, j = -1, k = -1;
const char *desc;
struct module *owner;

Expand Down Expand Up @@ -2701,8 +2701,11 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
continue;

j = i;
if (CON_IS_VISIBLE(vc))
if (CON_IS_VISIBLE(vc)) {
k = i;
save_screen(vc);
}

old_was_color = vc->vc_can_do_color;
vc->vc_sw->con_deinit(vc);
vc->vc_origin = (unsigned long)vc->vc_screenbuf;
Expand All @@ -2718,18 +2721,23 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
*/
if (old_was_color != vc->vc_can_do_color)
clear_buffer_attributes(vc);

if (CON_IS_VISIBLE(vc))
update_screen(vc);
}

printk("Console: switching ");
if (!deflt)
printk("consoles %d-%d ", first+1, last+1);
if (j >= 0)
if (j >= 0) {
struct vc_data *vc = vc_cons[j].d;

printk("to %s %s %dx%d\n",
vc_cons[j].d->vc_can_do_color ? "colour" : "mono",
desc, vc_cons[j].d->vc_cols, vc_cons[j].d->vc_rows);
else
vc->vc_can_do_color ? "colour" : "mono",
desc, vc->vc_cols, vc->vc_rows);

if (k >= 0) {
vc = vc_cons[k].d;
update_screen(vc);
}
} else
printk("to %s\n", desc);

release_console_sem();
Expand Down

0 comments on commit 5e68616

Please sign in to comment.