diff options
Diffstat (limited to 'usr.sbin/sysinstall/termcap.c')
-rw-r--r-- | usr.sbin/sysinstall/termcap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c index ca5905a..0df0a77 100644 --- a/usr.sbin/sysinstall/termcap.c +++ b/usr.sbin/sysinstall/termcap.c @@ -75,7 +75,7 @@ set_termcap(void) { char *term; int stat; - struct ttysize ts; + struct winsize ws; term = getenv("TERM"); stat = ioctl(STDERR_FILENO, GIO_COLOR, &ColorDisplay); @@ -141,10 +141,10 @@ set_termcap(void) } #endif } - if (ioctl(0, TIOCGSIZE, &ts) == -1) { + if (ioctl(0, TIOCGWINSZ, &ws) == -1) { msgDebug("Unable to get terminal size - errno %d\n", errno); - ts.ts_lines = 0; + ws.ws_row = 0; } - StatusLine = ts.ts_lines ? ts.ts_lines - 1: (OnVTY ? VTY_STATUS_LINE : TTY_STATUS_LINE); + StatusLine = ws.ws_row ? ws.ws_row - 1: (OnVTY ? VTY_STATUS_LINE : TTY_STATUS_LINE); return 0; } |