Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 134218 Details for
Bug 196921
Add vt-printk-color.diff to gentoo-sources
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch I would like to be included
vt-printk-color.diff (text/plain), 3.05 KB, created by
jannis
on 2007-10-24 13:13:59 UTC
(
hide
)
Description:
Patch I would like to be included
Filename:
MIME Type:
Creator:
jannis
Created:
2007-10-24 13:13:59 UTC
Size:
3.05 KB
patch
obsolete
>=================================================================== >--- linux-2.6.21-rc5.orig/drivers/char/Kconfig >+++ linux-2.6.21-rc5/drivers/char/Kconfig >@@ -57,6 +57,34 @@ config VT_CONSOLE > > If unsure, say Y. > >+config VT_CKO >+ hex "Colored kernel message output" >+ range 0x00 0xFF >+ depends on VT_CONSOLE >+ default 0x17 >+ ---help--- >+ This option will give you ability to change the color of >+ kernel messages. >+ >+ The value you need to enter here is the ASCII color value >+ composed (OR'ed) by one foreground color, one background >+ color and any number of attributes as follows: >+ >+ Foreground: Background: Attributes: >+ 0x01 blue 0x10 blue 0x08 highlight foreground >+ 0x02 green 0x20 green 0x80 blinking foreground >+ 0x03 cyan 0x30 cyan >+ 0x04 red 0x40 red >+ 0x05 magenta 0x50 red >+ 0x06 brown 0x60 brown >+ 0x07 gray 0x70 gray >+ >+ Thus, 0x17 will yield gray-on-blue like you can see in >+ OpenBSD, 0x02 the green-on-black like on NetBSD. >+ Using "highlight foreground" does not work when you use >+ VGA Console and fonts with 512 glyphs. >+ VGA Framebuffer is not affected. >+ > config HW_CONSOLE > bool > depends on VT && !S390 && !UML >Index: linux-2.6.21-rc5/drivers/char/vt.c >=================================================================== >--- linux-2.6.21-rc5.orig/drivers/char/vt.c >+++ linux-2.6.21-rc5/drivers/char/vt.c >@@ -73,6 +73,7 @@ > */ > > #include <linux/module.h> >+#include <linux/moduleparam.h> > #include <linux/types.h> > #include <linux/sched.h> > #include <linux/tty.h> >@@ -2234,6 +2235,17 @@ struct tty_driver *console_driver; > > #ifdef CONFIG_VT_CONSOLE > >+static unsigned int cko_color = CONFIG_VT_CKO; >+ >+static __init int set_cko(char *str) >+{ >+ cko_color = simple_strtoul(str, NULL, 0); >+ return 1; >+} >+ >+__setup("cko=", set_cko); >+module_param(cko_color, uint, S_IRUGO | S_IWUSR); >+ > /* > * Console on virtual terminal > * >@@ -2274,12 +2286,16 @@ static void vt_console_print(struct cons > hide_cursor(vc); > > start = (ushort *)vc->vc_pos; >+ vc->vc_color = cko_color; >+ update_attr(vc); > > /* 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->vc_color = vc->vc_def_color; >+ update_attr(vc); > if (cnt > 0) { > if (CON_IS_VISIBLE(vc)) > vc->vc_sw->con_putcs(vc, start, cnt, vc->vc_y, vc->vc_x); >@@ -2292,6 +2308,8 @@ static void vt_console_print(struct cons > bs(vc); > start = (ushort *)vc->vc_pos; > myx = vc->vc_x; >+ vc->vc_color = cko_color; >+ update_attr(vc); > continue; > } > if (c != 13) >@@ -2299,6 +2317,8 @@ static void vt_console_print(struct cons > cr(vc); > start = (ushort *)vc->vc_pos; > myx = vc->vc_x; >+ vc->vc_color = cko_color; >+ update_attr(vc); > if (c == 10 || c == 13) > continue; > } >@@ -2320,6 +2340,8 @@ static void vt_console_print(struct cons > vc->vc_need_wrap = 1; > } > } >+ vc->vc_color = vc->vc_def_color; >+ update_attr(vc); > set_cursor(vc); > > quit: >#<EOF> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 196921
: 134218