[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1249647361-11582-2-git-send-email-pierre.habouzit@intersec.com>
Date: Fri, 7 Aug 2009 14:16:00 +0200
From: Pierre Habouzit <pierre.habouzit@...ersec.com>
To: Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: linux-kernel@...r.kernel.org, Pierre Habouzit <madcoder@...ian.org>
Subject: [PATCH 1/2] perf util: do_read should fail on EOF instead of busy-looping.
From: Pierre Habouzit <madcoder@...ian.org>
Signed-off-by: Pierre Habouzit <madcoder@...ian.org>
---
tools/perf/util/header.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 450384b..531f2b9 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -185,6 +185,8 @@ static void do_read(int fd, void *buf, size_t size)
if (ret < 0)
die("failed to read");
+ if (ret == 0)
+ die("failed to read: missing data");
size -= ret;
buf += ret;
--
1.6.4.rc2.183.g9085a
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists