From c8828e74f3c111d17105e9bed360338954f02836 Mon Sep 17 00:00:00 2001 From: jkh Date: Thu, 1 Aug 1996 13:47:03 +0000 Subject: Whoops! VTYs return zero values for TIOCGSIZE! Work around this. --- usr.sbin/sysinstall/termcap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/sysinstall/termcap.c') diff --git a/usr.sbin/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c index 8888ee9..06aca6c 100644 --- a/usr.sbin/sysinstall/termcap.c +++ b/usr.sbin/sysinstall/termcap.c @@ -82,8 +82,8 @@ set_termcap(void) } if (ioctl(0, TIOCGSIZE, &ts) == -1) { msgDebug("Unable to get terminal size - errno %d\n", errno); - ts.ts_lines = OnVTY ? VTY_STATUS_LINE : TTY_STATUS_LINE; + ts.ts_lines = 0; } - StatusLine = ts.ts_lines; + StatusLine = ts.ts_lines ? ts.ts_lines : (OnVTY ? VTY_STATUS_LINE : TTY_STATUS_LINE); return 0; } -- cgit v1.1