patch-2.1.42 linux/drivers/char/vc_screen.c
Next file: linux/drivers/isdn/Config.in
Previous file: linux/drivers/char/stallion.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Wed May 28 10:49:08 1997
- Orig file:
v2.1.41/linux/drivers/char/vc_screen.c
- Orig date:
Wed Apr 23 19:01:18 1997
diff -u --recursive --new-file v2.1.41/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
@@ -61,7 +61,19 @@
/* Multimon patch */
if (!vc_cons[currcons].d) return 0;
#endif
- size= video_num_lines * video_num_columns;
+#ifdef CONFIG_FB_CONSOLE
+ int cons = MINOR(inode->i_rdev) & 127;
+
+ if (cons == 0)
+ cons = fg_console;
+ else
+ cons--;
+ if (!vc_cons_allocated(cons))
+ return -ENXIO;
+#endif
+
+ size = get_video_num_lines(cons) * get_video_num_columns(cons);
+
if (MINOR(inode->i_rdev) & 128)
size = 2*size + HEADER_SIZE;
return size;
@@ -128,8 +140,8 @@
} else {
if (p < HEADER_SIZE) {
char header[HEADER_SIZE];
- header[0] = (char) video_num_lines;
- header[1] = (char) video_num_columns;
+ header[0] = (char) get_video_num_lines(currcons);
+ header[1] = (char) get_video_num_columns(currcons);
getconsxy(currcons, header+2);
while (p < HEADER_SIZE && count > 0)
{ count--; put_user(header[p++], buf++); }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov