diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-12-04 09:23:01 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-12-04 13:08:19 -0500 |
commit | 779e24e2c777bffa9a6e3d5e821859e67008c98b (patch) | |
tree | b0e1324be4fdfbd7fb8f081b98a366a8f300c564 /tools | |
parent | 8df0b4ad58081773647dd2e0fddd45e8c0022c67 (diff) |
perf symbols: Fix random fd closing with no libelf
When built without libelf, perf tools was failing to initialize a file
descriptor, but nevertheless closing it. That sometimes resulted in the
output being truncated because the stdout file descriptor got closed.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1386166981-30197-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/symbol-minimal.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c index 2d2dd0532b5a..ac7070a2f2b6 100644 --- a/tools/perf/util/symbol-minimal.c +++ b/tools/perf/util/symbol-minimal.c | |||
@@ -253,6 +253,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso __maybe_unused, | |||
253 | if (!ss->name) | 253 | if (!ss->name) |
254 | goto out_close; | 254 | goto out_close; |
255 | 255 | ||
256 | ss->fd = fd; | ||
256 | ss->type = type; | 257 | ss->type = type; |
257 | 258 | ||
258 | return 0; | 259 | return 0; |