diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-08 05:39:55 -0400 |
commit | c324b44c34050cf2a9b58830e11c974806bd85d8 (patch) | |
tree | 3ac45a783221283925cd698334a8f5e7dd4c1df8 /drivers/char/vt.c | |
parent | 2fcf522509cceea524b6e7ece8fd6759b682175a (diff) | |
parent | caf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 665103ccaee8..b8d0c290b0db 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -434,21 +434,25 @@ void invert_screen(struct vc_data *vc, int offset, int count, int viewed) | |||
434 | /* used by selection: complement pointer position */ | 434 | /* used by selection: complement pointer position */ |
435 | void complement_pos(struct vc_data *vc, int offset) | 435 | void complement_pos(struct vc_data *vc, int offset) |
436 | { | 436 | { |
437 | static unsigned short *p; | 437 | static int old_offset = -1; |
438 | static unsigned short old; | 438 | static unsigned short old; |
439 | static unsigned short oldx, oldy; | 439 | static unsigned short oldx, oldy; |
440 | 440 | ||
441 | WARN_CONSOLE_UNLOCKED(); | 441 | WARN_CONSOLE_UNLOCKED(); |
442 | 442 | ||
443 | if (p) { | 443 | if (old_offset != -1 && old_offset >= 0 && |
444 | scr_writew(old, p); | 444 | old_offset < vc->vc_screenbuf_size) { |
445 | scr_writew(old, screenpos(vc, old_offset, 1)); | ||
445 | if (DO_UPDATE(vc)) | 446 | if (DO_UPDATE(vc)) |
446 | vc->vc_sw->con_putc(vc, old, oldy, oldx); | 447 | vc->vc_sw->con_putc(vc, old, oldy, oldx); |
447 | } | 448 | } |
448 | if (offset == -1) | 449 | |
449 | p = NULL; | 450 | old_offset = offset; |
450 | else { | 451 | |
452 | if (offset != -1 && offset >= 0 && | ||
453 | offset < vc->vc_screenbuf_size) { | ||
451 | unsigned short new; | 454 | unsigned short new; |
455 | unsigned short *p; | ||
452 | p = screenpos(vc, offset, 1); | 456 | p = screenpos(vc, offset, 1); |
453 | old = scr_readw(p); | 457 | old = scr_readw(p); |
454 | new = old ^ vc->vc_complement_mask; | 458 | new = old ^ vc->vc_complement_mask; |
@@ -459,6 +463,7 @@ void complement_pos(struct vc_data *vc, int offset) | |||
459 | vc->vc_sw->con_putc(vc, new, oldy, oldx); | 463 | vc->vc_sw->con_putc(vc, new, oldy, oldx); |
460 | } | 464 | } |
461 | } | 465 | } |
466 | |||
462 | } | 467 | } |
463 | 468 | ||
464 | static void insert_char(struct vc_data *vc, unsigned int nr) | 469 | static void insert_char(struct vc_data *vc, unsigned int nr) |
@@ -2272,7 +2277,9 @@ int tioclinux(struct tty_struct *tty, unsigned long arg) | |||
2272 | ret = paste_selection(tty); | 2277 | ret = paste_selection(tty); |
2273 | break; | 2278 | break; |
2274 | case TIOCL_UNBLANKSCREEN: | 2279 | case TIOCL_UNBLANKSCREEN: |
2280 | acquire_console_sem(); | ||
2275 | unblank_screen(); | 2281 | unblank_screen(); |
2282 | release_console_sem(); | ||
2276 | break; | 2283 | break; |
2277 | case TIOCL_SELLOADLUT: | 2284 | case TIOCL_SELLOADLUT: |
2278 | ret = sel_loadlut(p); | 2285 | ret = sel_loadlut(p); |
@@ -2317,8 +2324,10 @@ int tioclinux(struct tty_struct *tty, unsigned long arg) | |||
2317 | } | 2324 | } |
2318 | break; | 2325 | break; |
2319 | case TIOCL_BLANKSCREEN: /* until explicitly unblanked, not only poked */ | 2326 | case TIOCL_BLANKSCREEN: /* until explicitly unblanked, not only poked */ |
2327 | acquire_console_sem(); | ||
2320 | ignore_poke = 1; | 2328 | ignore_poke = 1; |
2321 | do_blank_screen(0); | 2329 | do_blank_screen(0); |
2330 | release_console_sem(); | ||
2322 | break; | 2331 | break; |
2323 | case TIOCL_BLANKEDSCREEN: | 2332 | case TIOCL_BLANKEDSCREEN: |
2324 | ret = console_blanked; | 2333 | ret = console_blanked; |