summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0004.bin
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0004.bin')
-rw-r--r--zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0004.bin67
1 files changed, 67 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0004.bin b/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0004.bin
new file mode 100644
index 000000000..26e6b12cb
--- /dev/null
+++ b/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0004.bin
@@ -0,0 +1,67 @@
+>From 96d4ca3852279b0ae85b8b4ea1031fda2574d610 Mon Sep 17 00:00:00 2001
+From: Anssi Hannula <anssi.hannula@iki.fi>
+Date: Sun, 18 Dec 2011 12:16:18 +0200
+Subject: [PATCH] set default console as vt7 (proof-of-concept)
+
+---
+ drivers/tty/vt/vc_screen.c | 1 +
+ drivers/tty/vt/vt.c | 24 ++++++++++++++++--------
+ 2 files changed, 17 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c
+index 7a367ff..cdab4d5 100644
+--- a/drivers/tty/vt/vc_screen.c
++++ b/drivers/tty/vt/vc_screen.c
+@@ -662,5 +662,6 @@ int __init vcs_init(void)
+ device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
+ for (i = 0; i < MIN_NR_CONSOLES; i++)
+ vcs_make_sysfs(i);
++ vcs_make_sysfs(6);
+ return 0;
+ }
+diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
+index e716839..72733ce 100644
+--- a/drivers/tty/vt/vt.c
++++ b/drivers/tty/vt/vt.c
+@@ -2871,6 +2871,19 @@ static void vc_init(struct vc_data *vc, unsigned int rows,
+ reset_terminal(vc, do_clear);
+ }
+
++static void __init con_init_early_cons(unsigned int cons)
++{
++ struct vc_data *vc;
++
++ vc_cons[cons].d = vc = kzalloc(sizeof(struct vc_data), GFP_NOWAIT);
++ INIT_WORK(&vc_cons[cons].SAK_work, vc_SAK);
++ tty_port_init(&vc->port);
++ visual_init(vc, cons, 1);
++ vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
++ vc_init(vc, vc->vc_rows, vc->vc_cols,
++ cons || !vc->vc_sw->con_save_screen);
++}
++
+ /*
+ * This routine initializes console interrupts, and does nothing
+ * else. If you want the screen to clear, call tty_write with
+@@ -2915,15 +2928,10 @@ static int __init con_init(void)
+ }
+
+ for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) {
+- vc_cons[currcons].d = vc = kzalloc(sizeof(struct vc_data), GFP_NOWAIT);
+- INIT_WORK(&vc_cons[currcons].SAK_work, vc_SAK);
+- tty_port_init(&vc->port);
+- visual_init(vc, currcons, 1);
+- vc->vc_screenbuf = kzalloc(vc->vc_screenbuf_size, GFP_NOWAIT);
+- vc_init(vc, vc->vc_rows, vc->vc_cols,
+- currcons || !vc->vc_sw->con_save_screen);
++ con_init_early_cons(currcons);
+ }
+- currcons = fg_console = 0;
++ con_init_early_cons(6);
++ currcons = fg_console = 6;
+ master_display_fg = vc = vc_cons[currcons].d;
+ set_origin(vc);
+ save_screen(vc);
+--
+1.7.7.2
+