perf probe: Fix wrong warning in __show_one_line() if read(1) errors happen
authorFranck Bui-Huu <vagabon.xyz@gmail.com>
Wed, 22 Dec 2010 16:37:13 +0000 (17:37 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Dec 2010 22:32:08 +0000 (20:32 -0200)
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

index 099336ed34b4ca9f7be797ab3eb8dc97642b85ad..4bde988a0b04dfeb5fd6f395c4bf6dd2167f907c 100644 (file)
@@ -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;