* [tip:perf/core] perf top: Use set_term_quiet() instead of open coded equivalent
@ 2014-08-24 14:59 tip-bot for Jiri Olsa
0 siblings, 0 replies; only message in thread
From: tip-bot for Jiri Olsa @ 2014-08-24 14:59 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, hpa, mingo, jolsa, a.p.zijlstra,
jean.pihet, namhyung, fweisbec, adrian.hunter, dsahern, tglx,
cjashfor
Commit-ID: 3969cc094a9dbb40e624b259caa73c7a2056b249
Gitweb: http://git.kernel.org/tip/3969cc094a9dbb40e624b259caa73c7a2056b249
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Fri, 15 Aug 2014 16:24:45 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Sun, 24 Aug 2014 08:11:18 -0300
perf top: Use set_term_quiet() instead of open coded equivalent
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-h7n9te70flmaqfnj6l06ay6r@git.kernel.org
[ Yanked this out of a patch containing this and some other change ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-top.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index a77ff6c..9848e27 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -433,18 +433,13 @@ static bool perf_top__handle_keypress(struct perf_top *top, int c)
if (!perf_top__key_mapped(top, c)) {
struct pollfd stdin_poll = { .fd = 0, .events = POLLIN };
- struct termios tc, save;
+ struct termios save;
perf_top__print_mapped_keys(top);
fprintf(stdout, "\nEnter selection, or unmapped key to continue: ");
fflush(stdout);
- tcgetattr(0, &save);
- tc = save;
- tc.c_lflag &= ~(ICANON | ECHO);
- tc.c_cc[VMIN] = 0;
- tc.c_cc[VTIME] = 0;
- tcsetattr(0, TCSANOW, &tc);
+ set_term_quiet_input(&save);
poll(&stdin_poll, 1, -1);
c = getc(stdin);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-08-24 15:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-24 14:59 [tip:perf/core] perf top: Use set_term_quiet() instead of open coded equivalent tip-bot for Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®