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: |