From: Pierre Habouzit <pierre.habouzit@intersec.com>
To: Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: linux-kernel@vger.kernel.org, Pierre Habouzit <madcoder@debian.org>
Subject: [PATCH 1/2] perf util: do_read should fail on EOF instead of busy-looping.
Date: Fri, 7 Aug 2009 14:16:00 +0200 [thread overview]
Message-ID: <1249647361-11582-2-git-send-email-pierre.habouzit@intersec.com> (raw)
In-Reply-To: <1249647361-11582-1-git-send-email-pierre.habouzit@intersec.com>
From: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
| 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
--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
next prev parent reply other threads:[~2009-08-07 12:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 12:15 perf-record fix and UI improvement Pierre Habouzit
2009-08-07 12:16 ` Pierre Habouzit [this message]
2009-08-07 12:16 ` [PATCH 2/2] perf-record: improve -A UI for empty or non-existent perf.data Pierre Habouzit
2009-08-07 15:10 ` [tip:perfcounters/urgent] perf record: Fix the " tip-bot for Pierre Habouzit
2009-08-07 15:09 ` [tip:perfcounters/urgent] perf util: Fix do_read() to fail on EOF instead of busy-looping tip-bot for Pierre Habouzit
2009-08-07 12:28 ` perf-record fix and UI improvement Pierre Habouzit
2009-08-07 13:01 ` Peter Zijlstra
2009-08-07 13:59 ` Pierre Habouzit
2009-08-07 15:09 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249647361-11582-2-git-send-email-pierre.habouzit@intersec.com \
--to=pierre.habouzit@intersec.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=madcoder@debian.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®