[tip:perf/core] perf probe: Fix wrong warning in __show_one_line() if read(1) errors happen

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tip-bot for Franck Bui-Huu
Date: Saturday, December 25, 2010 - 1:58 am

Commit-ID:  32b2b6ec57a3adb3ab7215fbf36ec61c15de06ee
Gitweb:     http://git.kernel.org/tip/32b2b6ec57a3adb3ab7215fbf36ec61c15de06ee
Author:     Franck Bui-Huu <vagabon.xyz@gmail.com>
AuthorDate: Wed, 22 Dec 2010 17:37:13 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 22 Dec 2010 20:32:08 -0200

perf probe: Fix wrong warning in __show_one_line() if read(1) errors happen

This was introduced by commit fde52dbd7f71934aba4e150f3d1d51e826a08850.

Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <m3y67hsr0m.fsf@gmail.com>
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 099336e..4bde988 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -309,7 +309,7 @@ static int __show_one_line(FILE *fp, int l, bool skip, bool show_num)
 	return 1;
 error:
 	if (ferror(fp)) {
-		pr_warning("Source file is shorter than expected.\n");
+		pr_warning("File read error: %s\n", strerror(errno));
 		return -1;
 	}
 	return 0;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/6] Minor cleanups &amp; fixes for perf-probe(1), Franck Bui-Huu, (Mon Dec 20, 7:17 am)
Re: [PATCH 1/6] perf-tools: make perf-probe -L display the ..., Masami Hiramatsu, (Mon Dec 20, 10:30 pm)
Re: [PATCH 6/6] perf-probe: handle gracefully some stupid ..., Masami Hiramatsu, (Tue Dec 21, 6:10 am)
Re: [PATCH 0/6] Minor cleanups &amp; fixes for perf-probe(1), Masami Hiramatsu, (Tue Dec 21, 6:11 am)
Re: [PATCH 0/6] Minor cleanups &amp; fixes for perf-probe(1), Franck Bui-Huu, (Tue Dec 21, 11:01 am)
Re: [PATCH 0/6] Minor cleanups &amp; fixes for perf-probe(1), Arnaldo Carvalho de Melo, (Tue Dec 21, 2:05 pm)
[tip:perf/core] perf probe: Make -L display the absolute p ..., tip-bot for Franck B ..., (Wed Dec 22, 4:30 am)
[tip:perf/core] perf probe: Rewrite show_one_line() to mak ..., tip-bot for Franck B ..., (Wed Dec 22, 4:30 am)
[tip:perf/core] perf probe: Clean up redundant tests in sh ..., tip-bot for Franck B ..., (Wed Dec 22, 4:31 am)
[tip:perf/core] perf probe: Fix line range description sin ..., tip-bot for Franck B ..., (Wed Dec 22, 4:31 am)
[tip:perf/core] perf probe: Don't always consider EOF as a ..., tip-bot for Franck B ..., (Wed Dec 22, 4:31 am)
[tip:perf/core] perf probe: Handle gracefully some stupid ..., tip-bot for Franck B ..., (Wed Dec 22, 4:32 am)
Re: [tip:perf/core] perf probe: Don't always consider EOF ..., Arnaldo Carvalho de Melo, (Wed Dec 22, 7:43 am)
Re: [PATCH 0/6] Minor cleanups &amp; fixes for perf-probe(1), Masami Hiramatsu, (Thu Dec 23, 5:36 pm)
[tip:perf/core] perf probe: Fix wrong warning in __show_on ..., tip-bot for Franck B ..., (Sat Dec 25, 1:58 am)