diff options
author | Eric Andersen | 2003-09-15 08:33:45 +0000 |
---|---|---|
committer | Eric Andersen | 2003-09-15 08:33:45 +0000 |
commit | 8efe967018dd79aacfe3ca1e2583f115d744e466 (patch) | |
tree | 7590704be6cf03c87242043f5909e12eb4150356 /networking/telnet.c | |
parent | c4f72d1426e03f046ac54a00d733a4a52c3a5d4b (diff) | |
download | busybox-8efe967018dd79aacfe3ca1e2583f115d744e466.zip busybox-8efe967018dd79aacfe3ca1e2583f115d744e466.tar.gz |
Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
to ensure proper fallback behavior on, i.e. serial consoles.
-Erik
Diffstat (limited to 'networking/telnet.c')
-rw-r--r-- | networking/telnet.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/networking/telnet.c b/networking/telnet.c index 88607f6..ac6ec98 100644 --- a/networking/telnet.c +++ b/networking/telnet.c @@ -44,10 +44,6 @@ #include <netinet/in.h> #include "busybox.h" -#ifdef CONFIG_FEATURE_AUTOWIDTH -# include <sys/ioctl.h> -#endif - #if 0 static const int DOTRACE = 1; #endif @@ -585,11 +581,7 @@ extern int telnet_main(int argc, char** argv) #endif #ifdef CONFIG_FEATURE_AUTOWIDTH - struct winsize winp; - if( ioctl(0, TIOCGWINSZ, &winp) == 0 ) { - win_width = winp.ws_col; - win_height = winp.ws_row; - } + get_terminal_width_height(0, &win_width, &win_height); #endif #ifdef CONFIG_FEATURE_TELNET_TTYPE |