Commit-ID: 0ab7368f8dad561b6164b3e942cab00f9565bd37 Gitweb: http://git.kernel.org/tip/0ab7368f8dad561b6164b3e942cab00f9565bd37 Author: Matt Fleming <matt@xxxxxxxxxxxxxxxxx> AuthorDate: Sat, 28 Aug 2010 16:46:19 +0100 Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxxxxxxxxxx> CommitDate: Tue, 26 Oct 2010 13:03:09 -0200 perf record: Remove newline character from perror() argument If we include a newline character in the string argument to perror() then the output will be split across two lines like so, Unable to read perf file descriptor : No space left on device Deleting the newline character prints a much more readable error, Unable to read perf file descriptor: No space left on device Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx> Cc: Tom Zanussi <tzanussi@xxxxxxxxx> LKML-Reference: <89e77b54659bc3798b23a5596c2debb7f6f4cf27.1283010281.git.matt@xxxxxxxxxxxxxxxxx> Signed-off-by: Matt Fleming <matt@xxxxxxxxxxxxxxxxx> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxxxxxxxxxx> --- tools/perf/builtin-record.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index ff77b80..b530bee 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -353,7 +353,7 @@ try_again: } if (read(fd[nr_cpu][counter][thread_index], &read_data, sizeof(read_data)) == -1) { - perror("Unable to read perf file descriptor\n"); + perror("Unable to read perf file descriptor"); exit(-1); } @@ -626,7 +626,7 @@ static int __cmd_record(int argc, const char **argv) nr_cpus = read_cpu_map(cpu_list); if (nr_cpus < 1) { - perror("failed to collect number of CPUs\n"); + perror("failed to collect number of CPUs"); return -1; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html