summaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-09-08 14:27:13 -0700
committerTony Luck <tony.luck@intel.com>2005-09-08 14:27:13 -0700
commit344a076110f4ecb16ea6d286b63be696604982ed (patch)
treedef6e229efdb6ee91b631b6695bf7f9ace8e2719 /drivers/char/vt.c
parent9b17e7e74e767d8a494a74c3c459aeecd1e08c5f (diff)
parent1b11d78cf87a7014f96e5b7fa2e1233cc8081a00 (diff)
downloadop-kernel-dev-344a076110f4ecb16ea6d286b63be696604982ed.zip
op-kernel-dev-344a076110f4ecb16ea6d286b63be696604982ed.tar.gz
[IA64] Manual merge fix for 3 files
arch/ia64/Kconfig arch/ia64/kernel/acpi.c include/asm-ia64/irq.h Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r--drivers/char/vt.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 665103c..b8d0c29 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)
/* used by selection: complement pointer position */
void complement_pos(struct vc_data *vc, int offset)
{
- static unsigned short *p;
+ static int old_offset = -1;
static unsigned short old;
static unsigned short oldx, oldy;
WARN_CONSOLE_UNLOCKED();
- if (p) {
- scr_writew(old, p);
+ if (old_offset != -1 && old_offset >= 0 &&
+ old_offset < vc->vc_screenbuf_size) {
+ scr_writew(old, screenpos(vc, old_offset, 1));
if (DO_UPDATE(vc))
vc->vc_sw->con_putc(vc, old, oldy, oldx);
}
- if (offset == -1)
- p = NULL;
- else {
+
+ old_offset = offset;
+
+ if (offset != -1 && offset >= 0 &&
+ offset < vc->vc_screenbuf_size) {
unsigned short new;
+ unsigned short *p;
p = screenpos(vc, offset, 1);
old = scr_readw(p);
new = old ^ vc->vc_complement_mask;
@@ -459,6 +463,7 @@ void complement_pos(struct vc_data *vc, int offset)
vc->vc_sw->con_putc(vc, new, oldy, oldx);
}
}
+
}
static void insert_char(struct vc_data *vc, unsigned int nr)
@@ -2272,7 +2277,9 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
ret = paste_selection(tty);
break;
case TIOCL_UNBLANKSCREEN:
+ acquire_console_sem();
unblank_screen();
+ release_console_sem();
break;
case TIOCL_SELLOADLUT:
ret = sel_loadlut(p);
@@ -2317,8 +2324,10 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
}
break;
case TIOCL_BLANKSCREEN: /* until explicitly unblanked, not only poked */
+ acquire_console_sem();
ignore_poke = 1;
do_blank_screen(0);
+ release_console_sem();
break;
case TIOCL_BLANKEDSCREEN:
ret = console_blanked;
OpenPOWER on IntegriCloud