summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2017-01-11 10:50:08 +0100
committerDenys Vlasenko2017-01-11 10:50:08 +0100
commit0fd9fb4244a6dd4ba71f81e355261115cd80d2f1 (patch)
tree137ad4a92ea3ec969351fca63cb419fe19da6e3a
parentc5891fe1af821dae83a8b1df088462b6989d089b (diff)
downloadbusybox-0fd9fb4244a6dd4ba71f81e355261115cd80d2f1.zip
busybox-0fd9fb4244a6dd4ba71f81e355261115cd80d2f1.tar.gz
top: FEATURE_USE_TERMIOS shouldn't control reading of screen size
It controls whether we take input. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--procps/top.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/procps/top.c b/procps/top.c
index 71207ba..491acb5 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -726,7 +726,6 @@ static void clearmems(void)
}
#if ENABLE_FEATURE_USE_TERMIOS
-
static void reset_term(void)
{
if (!OPT_BATCH_MODE)
@@ -738,7 +737,6 @@ static void sig_catcher(int sig)
reset_term();
kill_myself_with_sig(sig);
}
-
#endif /* FEATURE_USE_TERMIOS */
/*
@@ -1165,14 +1163,12 @@ int top_main(int argc UNUSED_PARAM, char **argv)
} else {
G.lines = 24; /* default */
col = 79;
-#if ENABLE_FEATURE_USE_TERMIOS
/* We output to stdout, we need size of stdout (not stdin)! */
get_terminal_width_height(STDOUT_FILENO, &col, &G.lines);
if (G.lines < 5 || col < 10) {
sleep(interval);
continue;
}
-#endif
if (col > LINE_BUF_SIZE - 2)
col = LINE_BUF_SIZE - 2;
}