patch-2.1.111 linux/drivers/char/vc_screen.c
Next file: linux/drivers/char/vt.c
Previous file: linux/drivers/char/tuner.c
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Wed Jul 22 13:40:04 1998
- Orig file:
v2.1.110/linux/drivers/char/vc_screen.c
- Orig date:
Wed Jul 1 19:38:54 1998
diff -u --recursive --new-file v2.1.110/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
@@ -170,7 +170,7 @@
long p = *ppos;
long viewed, attr, size, written;
const char *buf0;
- unsigned short *org = NULL;
+ u16 *org0 = NULL, *org = NULL;
attr = (currcons & 128);
currcons = (currcons & 127);
@@ -193,7 +193,7 @@
buf0 = buf;
if (!attr) {
- org = screen_pos(currcons, p, viewed);
+ org0 = org = screen_pos(currcons, p, viewed);
while (count > 0) {
unsigned char c;
count--;
@@ -211,8 +211,8 @@
putconsxy(currcons, header+2);
}
if (count > 0) {
- p -= HEADER_SIZE;
- org = screen_pos(currcons, p/2, viewed);
+ p -= HEADER_SIZE;
+ org0 = org = screen_pos(currcons, p/2, viewed);
if ((p & 1) && count > 0) {
char c;
count--;
@@ -244,9 +244,8 @@
#endif
}
}
- if (currcons == fg_console)
- /* Horribly inefficient if count < screen size. */
- update_screen(currcons);
+ if (org0)
+ update_region(currcons, (unsigned long)(org0), org-org0);
written = buf - buf0;
*ppos += written;
RETURN( written );
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov