summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_vt220.c
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2010-01-27 10:12:38 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-01-27 10:12:49 +0100
commit0b665d770d2d4dca8e9ea53129735fe214838ec9 (patch)
tree365f0b15c48fc2fe22bf5468c40998af95a96f9e /drivers/s390/char/sclp_vt220.c
parent0b4d78903bf48fe6b125c4c9f0755437a4f21d47 (diff)
[S390] sclp_vt220: set initial terminal window size
When opening a SCLP VT220 terminal, the terminal window size is not initialized (defaults to zero). Since the SCLP VT220 terminal supports only 80x24, explicitly set the window size to prevent (n)curses applications from guessing the default setting. Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/sclp_vt220.c')
-rw-r--r--drivers/s390/char/sclp_vt220.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index b9d2a007e93..3796ffdb847 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -495,6 +495,10 @@ sclp_vt220_open(struct tty_struct *tty, struct file *filp)
if (tty->driver_data == NULL)
return -ENOMEM;
tty->low_latency = 0;
+ if (!tty->winsize.ws_row && !tty->winsize.ws_col) {
+ tty->winsize.ws_row = 24;
+ tty->winsize.ws_col = 80;
+ }
}
return 0;
}