lkml.org 
[lkml]   [2013]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf tools: Fix random fd closing with no libelf
Date
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>
---
tools/perf/util/symbol-minimal.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 2d2dd05..ac7070a 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;
--
1.7.11.7


\
 
 \ /
  Last update: 2013-12-05 00:41    [W:0.053 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site