kernel-fxtec-pro1x/tools
Tommi Rantala 9d3b4a3612 perf top: Fix stdio interface input handling with glibc 2.28+
commit 29b4f5f188571c112713c35cc87eefb46efee612 upstream.

Since glibc 2.28 when running 'perf top --stdio', input handling no
longer works, but hitting any key always just prints the "Mapped keys"
help text.

To fix it, call clearerr() in the display_thread() loop to clear any EOF
sticky errors, as instructed in the glibc NEWS file
(https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS):

 * All stdio functions now treat end-of-file as a sticky condition.  If you
   read from a file until EOF, and then the file is enlarged by another
   process, you must call clearerr or another function with the same effect
   (e.g. fseek, rewind) before you can read the additional data.  This
   corrects a longstanding C99 conformance bug.  It is most likely to affect
   programs that use stdio to read interactive input from a terminal.
   (Bug #1190.)

Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200305083714.9381-2-tommi.t.rantala@nokia.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-14 10:31:22 +02:00
..
accounting tools/accounting/getdelays.c: fix netlink attribute length 2020-04-13 10:45:10 +02:00
arch jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00
bpf bpftool: Fix printing incorrect pointer in btf_dump_ptr 2020-04-29 16:31:07 +02:00
build tools build feature: Quote CC and CXX for their arguments 2020-08-21 11:05:39 +02:00
cgroup tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
firewire
gpio tools: gpio-hammer: Avoid potential overflow in main 2020-10-01 13:14:39 +02:00
hv Tools: hv: kvp: eliminate 'may be used uninitialized' warning 2019-09-10 10:33:50 +01:00
iio iio: iio-utils: Fix possible incorrect mask calculation 2019-07-31 07:27:02 +02:00
include perf tools: Correct SNOOPX field offset 2020-09-09 19:04:27 +02:00
kvm/kvm_stat tools/kvm_stat: Fix kvm_exit filter name 2020-02-11 04:34:08 -08:00
laptop tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
leds tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
lib tools lib traceevent: Fix memory leak in process_dynamic_array_len 2020-08-11 15:32:33 +02:00
memory-model tools/memory-model: Rename litmus tests to comply to norm7 2018-07-17 09:30:36 +02:00
nfsd
objtool objtool: Fix noreturn detection for ignored functions 2020-10-01 13:14:50 +02:00
pci tools: PCI: Fix broken pcitest compilation 2019-11-24 08:21:08 +01:00
pcmcia
perf perf top: Fix stdio interface input handling with glibc 2.28+ 2020-10-14 10:31:22 +02:00
power tools/power/x86/intel_pstate_tracer: changes for python 3 compatibility 2020-10-01 13:14:31 +02:00
scripts tools: Let O= makes handle a relative path with -C option 2020-04-02 15:28:17 +02:00
spi tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
testing selftests/x86/syscall_nt: Clear weird flags after each test 2020-10-01 13:14:49 +02:00
thermal/tmon tools/thermal: tmon: fix for segfault 2018-03-27 09:51:23 +02:00
time
usb usbip: Fix unsafe unaligned pointer usage 2020-02-24 08:34:45 +01:00
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm tools/vm: fix cross-compile build 2020-04-29 16:31:28 +02:00
wmi tools: fix cross-compile var clobbering 2018-02-21 15:35:42 -08:00
Makefile