summaryrefslogtreecommitdiff
blob: 06d9f6cbdbfd7637c16f9861b9910ea8ae6b57a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index 3f5877e..600c75a 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -58,28 +58,20 @@ config VT_CONSOLE
 
 	  If unsure, say Y.
 
-config VT_CKO
+menuconfig VT_CKO
 	bool "Colored kernel message output"
 	depends on VT_CONSOLE
 	---help---
 	This option enables kernel messages to be emitted in
 	colors other than the default.
+	You can also change the colors at run-time, or set them at boot-time
+	using the "vt.printk_color" option.
+
 	This option enlarges your kernel by approximately 1/2 KB.
 
 	If unsure, say N.
 
-config VT_PRINTK_COLOR
-	hex "Colored kernel message output"
-	range 0x00 0xFF
-	depends on VT_CKO
-	default 0x07
-	---help---
-	This option defines with which color kernel messages will be
-	printed to the console. This applies to all log levels.
-	You can change the colors at run-time, or set them at boot-time
-	using the "vt.printk_color" option.
-
-	The value you need to enter here is the value is composed
+	The value you need to enter is the value is composed
 	(OR-ed) of a foreground and a background color.
 
 	Foreground:
@@ -103,6 +95,74 @@ config VT_PRINTK_COLOR
 
 	For example, 0x1F would yield white on red.
 
+if VT_CKO
+
+config VT_PRINTK_EMERG_COLOR
+	hex 'Color for "emergency" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color kernel emergency messages
+	will be printed to the console.
+
+config VT_PRINTK_ALERT_COLOR
+	hex 'Color for "alert" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color kernel alert messages
+	will be printed to the console.
+
+config VT_PRINTK_CRIT_COLOR
+	hex 'Color for "critical" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color critical kernel messages
+	will be printed to the console.
+
+config VT_PRINTK_ERROR_COLOR
+	hex 'Color for "error" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color kernel error messages
+	will be printed to the console.
+
+config VT_PRINTK_WARNING_COLOR
+	hex 'Color for "warning" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color kernel warning messages
+	will be printed to the console.
+
+config VT_PRINTK_NOTICE_COLOR
+	hex 'Color for "notice" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color kernel notices
+	will be printed to the console.
+
+config VT_PRINTK_INFO_COLOR
+	hex 'Color for "info" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color informational kernel messages
+	will be printed to the console.
+
+config VT_PRINTK_DEBUG_COLOR
+	hex 'Color for "debug" level'
+	range 0x00 0xFF
+	default 0x07
+	---help---
+	This option defines in which color kernel debugging messages
+	will be printed to the console.
+
+endif # VT_CKO
+
 config HW_CONSOLE
 	bool
 	depends on VT && !S390 && !UML
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 75ca0cf..a3f2ff3 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2395,14 +2395,14 @@ struct tty_driver *console_driver;
 
 #ifdef CONFIG_VT_CKO
 static unsigned int printk_color[8] __read_mostly = {
-	CONFIG_VT_PRINTK_COLOR, /* KERN_EMERG */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_ALERT */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_CRIT */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_ERR */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_WARNING */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_NOTICE */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_INFO */
-	CONFIG_VT_PRINTK_COLOR, /* KERN_DEBUG */
+	CONFIG_VT_PRINTK_EMERG_COLOR,
+	CONFIG_VT_PRINTK_ALERT_COLOR,
+	CONFIG_VT_PRINTK_CRIT_COLOR,
+	CONFIG_VT_PRINTK_ERROR_COLOR,
+	CONFIG_VT_PRINTK_WARNING_COLOR,
+	CONFIG_VT_PRINTK_NOTICE_COLOR,
+	CONFIG_VT_PRINTK_INFO_COLOR,
+	CONFIG_VT_PRINTK_DEBUG_COLOR,
 };
 module_param_array(printk_color, uint, NULL, S_IRUGO | S_IWUSR);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/