summaryrefslogtreecommitdiff
path: root/drivers/tty/vt/vt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/vt/vt.c')
-rw-r--r--drivers/tty/vt/vt.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index f9ae08ef4..bd523adb9 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -71,7 +71,6 @@
*/
#include <linux/module.h>
-#include <linux/moduleparam.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/tty.h>
@@ -2532,44 +2531,16 @@ int vt_kmsg_redirect(int new)
return kmsg_con;
}
-#ifdef CONFIG_VT_CKO
-static unsigned int printk_color[8] __read_mostly = {
- CONFIG_VT_PRINTK_EMERG_COLOR, /* KERN_EMERG */
- CONFIG_VT_PRINTK_ALERT_COLOR, /* KERN_ALERT */
- CONFIG_VT_PRINTK_CRIT_COLOR, /* KERN_CRIT */
- CONFIG_VT_PRINTK_ERR_COLOR, /* KERN_ERR */
- CONFIG_VT_PRINTK_WARNING_COLOR, /* KERN_WARNING */
- CONFIG_VT_PRINTK_NOTICE_COLOR, /* KERN_NOTICE */
- CONFIG_VT_PRINTK_INFO_COLOR, /* KERN_INFO */
- CONFIG_VT_PRINTK_DEBUG_COLOR, /* KERN_DEBUG */
-};
-module_param_array(printk_color, uint, NULL, S_IRUGO | S_IWUSR);
-
-static inline void vc_set_color(struct vc_data *vc, unsigned char color)
-{
- vc->vc_color = color_table[color & 0xF] |
- (color_table[(color >> 4) & 0x7] << 4) |
- (color & 0x80);
- update_attr(vc);
-}
-#else
-static unsigned int printk_color[8];
-static inline void vc_set_color(const struct vc_data *vc, unsigned char c)
-{
-}
-#endif
-
/*
* Console on virtual terminal
*
* The console must be locked when we get here.
*/
-static void vt_console_print(struct console *co, const char *b, unsigned count,
- unsigned int loglevel)
+static void vt_console_print(struct console *co, const char *b, unsigned count)
{
struct vc_data *vc = vc_cons[fg_console].d;
- unsigned char current_color, c;
+ unsigned char c;
static DEFINE_SPINLOCK(printing_lock);
const ushort *start;
ushort cnt = 0;
@@ -2605,20 +2576,11 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
start = (ushort *)vc->vc_pos;
- /*
- * We always get a valid loglevel - <8> and "no level" is transformed
- * to <4> in the typical kernel.
- */
- current_color = printk_color[loglevel];
- vc_set_color(vc, current_color);
-
-
/* Contrived structure to try to emulate original need_wrap behaviour
* Problems caused when we have need_wrap set on '\n' character */
while (count--) {
c = *b++;
if (c == 10 || c == 13 || c == 8 || vc->vc_need_wrap) {
- vc_set_color(vc, vc->vc_def_color);
if (cnt > 0) {
if (CON_IS_VISIBLE(vc))
vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x);
@@ -2631,7 +2593,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
bs(vc);
start = (ushort *)vc->vc_pos;
myx = vc->vc_x;
- vc_set_color(vc, current_color);
continue;
}
if (c != 13)
@@ -2639,7 +2600,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
cr(vc);
start = (ushort *)vc->vc_pos;
myx = vc->vc_x;
- vc_set_color(vc, current_color);
if (c == 10 || c == 13)
continue;
}
@@ -2662,7 +2622,6 @@ static void vt_console_print(struct console *co, const char *b, unsigned count,
vc->vc_need_wrap = 1;
}
}
- vc_set_color(vc, vc->vc_def_color);
set_cursor(vc);
notify_update(vc);