diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/termcap.c | 4 | ||||
-rw-r--r-- | usr.sbin/sysinstall/termcap.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sade/termcap.c b/usr.sbin/sade/termcap.c index 8888ee9..06aca6c 100644 --- a/usr.sbin/sade/termcap.c +++ b/usr.sbin/sade/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; } 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; } |