Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 196921
Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +29 lines)
Line  Link Here
0
-- linux-2.6.21-rc5.orig/drivers/char/Kconfig
0
++ linux-2.6.21-rc5/drivers/char/Kconfig
Lines 57-62 config VT_CONSOLE Link Here
57
57
58
	  If unsure, say Y.
58
	  If unsure, say Y.
59
59
60
config VT_CKO
61
	hex "Colored kernel message output"
62
	range 0x00 0xFF
63
	depends on VT_CONSOLE
64
	default 0x17
65
	---help---
66
	This option will give you ability to change the color of
67
	kernel messages.
68
69
	The value you need to enter here is the ASCII color value
70
	composed (OR'ed) by one foreground color, one background
71
	color and any number of attributes as follows:
72
73
	Foreground:     Background:    Attributes:
74
	0x01 blue       0x10 blue      0x08 highlight foreground
75
	0x02 green      0x20 green     0x80 blinking foreground
76
	0x03 cyan       0x30 cyan
77
	0x04 red        0x40 red
78
	0x05 magenta    0x50 red
79
	0x06 brown      0x60 brown
80
	0x07 gray       0x70 gray
81
82
	Thus, 0x17 will yield gray-on-blue like you can see in
83
	OpenBSD, 0x02 the green-on-black like on NetBSD.
84
	Using "highlight foreground" does not work when you use
85
	VGA Console and fonts with 512 glyphs.
86
	VGA Framebuffer is not affected.
87
60
config HW_CONSOLE
88
config HW_CONSOLE
61
	bool
89
	bool
62
	depends on VT && !S390 && !UML
90
	depends on VT && !S390 && !UML
(-)linux-2.6.21-rc5/drivers/char/vt.c (+22 lines)
Lines 73-78 Link Here
73
 */
73
 */
74
74
75
#include <linux/module.h>
75
#include <linux/module.h>
76
#include <linux/moduleparam.h>
76
#include <linux/types.h>
77
#include <linux/types.h>
77
#include <linux/sched.h>
78
#include <linux/sched.h>
78
#include <linux/tty.h>
79
#include <linux/tty.h>
Lines 2234-2239 struct tty_driver *console_driver; Link Here
2234
2235
2235
#ifdef CONFIG_VT_CONSOLE
2236
#ifdef CONFIG_VT_CONSOLE
2236
2237
2238
static unsigned int cko_color = CONFIG_VT_CKO;
2239
2240
static __init int set_cko(char *str)
2241
{
2242
	cko_color = simple_strtoul(str, NULL, 0);
2243
	return 1;
2244
}
2245
2246
__setup("cko=", set_cko);
2247
module_param(cko_color, uint, S_IRUGO | S_IWUSR);
2248
2237
/*
2249
/*
2238
 *	Console on virtual terminal
2250
 *	Console on virtual terminal
2239
 *
2251
 *
Lines 2274-2285 static void vt_console_print(struct cons Link Here
2274
		hide_cursor(vc);
2286
		hide_cursor(vc);
2275
2287
2276
	start = (ushort *)vc->vc_pos;
2288
	start = (ushort *)vc->vc_pos;
2289
	vc->vc_color = cko_color;
2290
	update_attr(vc);
2277
2291
2278
	/* Contrived structure to try to emulate original need_wrap behaviour
2292
	/* Contrived structure to try to emulate original need_wrap behaviour
2279
	 * Problems caused when we have need_wrap set on '\n' character */
2293
	 * Problems caused when we have need_wrap set on '\n' character */
2280
	while (count--) {
2294
	while (count--) {
2281
		c = *b++;
2295
		c = *b++;
2282
		if (c == 10 || c == 13 || c == 8 || vc->vc_need_wrap) {
2296
		if (c == 10 || c == 13 || c == 8 || vc->vc_need_wrap) {
2297
			vc->vc_color = vc->vc_def_color;
2298
			update_attr(vc);
2283
			if (cnt > 0) {
2299
			if (cnt > 0) {
2284
				if (CON_IS_VISIBLE(vc))
2300
				if (CON_IS_VISIBLE(vc))
2285
					vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x);
2301
					vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x);
Lines 2292-2297 static void vt_console_print(struct cons Link Here
2292
				bs(vc);
2308
				bs(vc);
2293
				start = (ushort *)vc->vc_pos;
2309
				start = (ushort *)vc->vc_pos;
2294
				myx = vc->vc_x;
2310
				myx = vc->vc_x;
2311
				vc->vc_color = cko_color;
2312
				update_attr(vc);
2295
				continue;
2313
				continue;
2296
			}
2314
			}
2297
			if (c != 13)
2315
			if (c != 13)
Lines 2299-2304 static void vt_console_print(struct cons Link Here
2299
			cr(vc);
2317
			cr(vc);
2300
			start = (ushort *)vc->vc_pos;
2318
			start = (ushort *)vc->vc_pos;
2301
			myx = vc->vc_x;
2319
			myx = vc->vc_x;
2320
			vc->vc_color = cko_color;
2321
			update_attr(vc);
2302
			if (c == 10 || c == 13)
2322
			if (c == 10 || c == 13)
2303
				continue;
2323
				continue;
2304
		}
2324
		}
Lines 2320-2325 static void vt_console_print(struct cons Link Here
2320
			vc->vc_need_wrap = 1;
2340
			vc->vc_need_wrap = 1;
2321
		}
2341
		}
2322
	}
2342
	}
2343
	vc->vc_color = vc->vc_def_color;
2344
	update_attr(vc);
2323
	set_cursor(vc);
2345
	set_cursor(vc);
2324
2346
2325
quit:
2347
quit:

Return to bug 196921