diff options
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0005.bin')
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0005.bin | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0005.bin b/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0005.bin new file mode 100644 index 000000000..50bfc1154 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20111218/d36a25cc/attachment-0005.bin @@ -0,0 +1,73 @@ +>From 83cb8160a3bd07138adc6a8938d6067f44a6cf22 Mon Sep 17 00:00:00 2001 +From: Anssi Hannula <anssi.hannula@iki.fi> +Date: Sun, 18 Dec 2011 12:24:04 +0200 +Subject: [PATCH] set default console as vt7 (proof-of-concept) + +--- + drivers/tty/vt/vc_screen.c | 3 +-- + drivers/tty/vt/vt.c | 8 ++++---- + include/linux/vt.h | 2 +- + 3 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/drivers/tty/vt/vc_screen.c b/drivers/tty/vt/vc_screen.c +index 7a367ff..8d7dd54 100644 +--- a/drivers/tty/vt/vc_screen.c ++++ b/drivers/tty/vt/vc_screen.c +@@ -660,7 +660,6 @@ int __init vcs_init(void) + + device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); + 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(DEFAULT_CONSOLE); + return 0; + } +diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c +index e716839..af6b932 100644 +--- a/drivers/tty/vt/vt.c ++++ b/drivers/tty/vt/vt.c +@@ -1018,7 +1018,7 @@ void vc_deallocate(unsigned int currcons) + put_pid(vc->vt_pid); + module_put(vc->vc_sw->owner); + kfree(vc->vc_screenbuf); +- if (currcons >= MIN_NR_CONSOLES) ++ if (currcons != DEFAULT_CONSOLE) + kfree(vc); + vc_cons[currcons].d = NULL; + } +@@ -2914,7 +2914,7 @@ static int __init con_init(void) + mod_timer(&console_timer, jiffies + (blankinterval * HZ)); + } + +- for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) { ++ currcons = DEFAULT_CONSOLE; + 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); +@@ -2922,8 +2922,8 @@ static int __init con_init(void) + 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); +- } +- currcons = fg_console = 0; ++ ++ fg_console = currcons; + master_display_fg = vc = vc_cons[currcons].d; + set_origin(vc); + save_screen(vc); +diff --git a/include/linux/vt.h b/include/linux/vt.h +index 30a8dd9..6abf4fb 100644 +--- a/include/linux/vt.h ++++ b/include/linux/vt.h +@@ -6,7 +6,7 @@ + * These constants are also useful for user-level apps (e.g., VC + * resizing). + */ +-#define MIN_NR_CONSOLES 1 /* must be at least 1 */ ++#define DEFAULT_CONSOLE 6 + #define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ + #define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */ + /* Note: the ioctl VT_GETSTATE does not work for +-- +1.7.7.2 + |