summaryrefslogtreecommitdiff
path: root/components/lwp/terminal/tty_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/lwp/terminal/tty_device.c')
-rw-r--r--components/lwp/terminal/tty_device.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/lwp/terminal/tty_device.c b/components/lwp/terminal/tty_device.c
index 17364fabc1..a2936a0d1b 100644
--- a/components/lwp/terminal/tty_device.c
+++ b/components/lwp/terminal/tty_device.c
@@ -347,8 +347,11 @@ static void tty_init_termios(lwp_tty_t tp)
t->__c_ispeed = TTYDEF_SPEED;
t->__c_ospeed = TTYDEF_SPEED;
- memcpy(&t->c_cc, tty_ctrl_charset,
- sizeof(tty_ctrl_charset) / sizeof(tty_ctrl_charset[0]));
+ /* Keep terminal consumers usable when the host cannot report a size. */
+ tp->t_winsize.ws_row = 24;
+ tp->t_winsize.ws_col = 80;
+
+ memcpy(&t->c_cc, tty_ctrl_charset, sizeof(tty_ctrl_charset));
#ifdef USING_BSD_INIT_LOCK_DEVICE
tp->t_termios_init_out = *t;