From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Matt Fleming <matt@console-pimps.org>,
Peter Zijlstra <peterz@infradead.org>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Tom Zanussi <tzanussi@gmail.com>,
Arnaldo Carvalho de Melo <acme@felicio.ghostprotocols.net>
Subject: [PATCH 1/4] perf record: Remove newline character from perror() argument
Date: Fri, 19 Nov 2010 19:29:40 -0200 [thread overview]
Message-ID: <1290202186-25352-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1290202186-25352-1-git-send-email-acme@infradead.org>
From: Matt Fleming <matt@console-pimps.org>
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@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <89e77b54659bc3798b23a5596c2debb7f6f4cf27.1283010281.git.matt@console-pimps.org>
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@felicio.ghostprotocols.net>
---
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;
}
--
1.6.2.5
next prev parent reply other threads:[~2010-11-19 21:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 21:29 [GIT PULL 0/3] perf tools improvements Arnaldo Carvalho de Melo
2010-11-19 21:29 ` Arnaldo Carvalho de Melo [this message]
2010-11-19 21:29 ` [PATCH 1/3] perf stat: Add no-aggregation mode to -a Arnaldo Carvalho de Melo
2010-11-19 21:29 ` [PATCH 2/4] perf scripting: Shut up 'perf record' final status Arnaldo Carvalho de Melo
2010-11-19 21:29 ` [PATCH 2/3] perf tools: Remove hardcoded include paths for elfutils Arnaldo Carvalho de Melo
2010-11-19 21:29 ` [PATCH 3/4] perf python scripting: Fixup cut'n'paste error in sctop script Arnaldo Carvalho de Melo
2010-11-19 21:29 ` [PATCH 3/3] perf tools: Change my maintainer address Arnaldo Carvalho de Melo
2010-11-19 21:29 ` [PATCH 4/4] perf python scripting: Add futex-contention script Arnaldo Carvalho de Melo
2010-11-21 13:21 ` [GIT PULL 0/3] perf tools improvements Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2010-10-26 19:25 [GIT PULL 0/4] perf python scripting improvements and fixes Arnaldo Carvalho de Melo
2010-10-26 19:25 ` [PATCH 1/4] perf record: Remove newline character from perror() argument Arnaldo Carvalho de Melo
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=1290202186-25352-2-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=acme@felicio.ghostprotocols.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@console-pimps.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tzanussi@gmail.com \
/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®