From: Adrian Hunter Date: Wed, 4 Dec 2013 14:23:01 +0000 (+0200) Subject: perf symbols: Fix random fd closing with no libelf X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=779e24e2c777bffa9a6e3d5e821859e67008c98b;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1386166981-30197-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- 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, if (!ss->name) goto out_close; + ss->fd = fd; ss->type = type; return 0;