* [PATCH] perf: Remove newline character from perror() argument
@ 2010-08-28 15:46 Matt Fleming
2010-08-28 15:52 ` Arnaldo Carvalho de Melo
2010-10-27 11:01 ` [tip:perf/urgent] perf record: " tip-bot for Matt Fleming
0 siblings, 2 replies; 5+ messages in thread
From: Matt Fleming @ 2010-08-28 15:46 UTC (permalink / raw)
To: linux-kernel
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Frederic Weisbecker, Tom Zanussi
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
Signed-off-by: Matt Fleming <matt@console-pimps.org>
---
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.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] perf: Remove newline character from perror() argument
2010-08-28 15:46 [PATCH] perf: Remove newline character from perror() argument Matt Fleming
@ 2010-08-28 15:52 ` Arnaldo Carvalho de Melo
2010-10-26 14:34 ` Matt Fleming
2010-10-27 11:01 ` [tip:perf/urgent] perf record: " tip-bot for Matt Fleming
1 sibling, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-08-28 15:52 UTC (permalink / raw)
To: Matt Fleming
Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Frederic Weisbecker, Tom Zanussi
Em Sat, Aug 28, 2010 at 04:46:19PM +0100, Matt Fleming escreveu:
> 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
Thanks, applying.
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf: Remove newline character from perror() argument
2010-08-28 15:52 ` Arnaldo Carvalho de Melo
@ 2010-10-26 14:34 ` Matt Fleming
2010-10-26 14:52 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: Matt Fleming @ 2010-10-26 14:34 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Frederic Weisbecker, Tom Zanussi
On Sat, Aug 28, 2010 at 12:52:51PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Sat, Aug 28, 2010 at 04:46:19PM +0100, Matt Fleming escreveu:
> > 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
>
> Thanks, applying.
>
> - Arnaldo
Hi Arnaldo,
Whatever happend to this? I can't see it in any of the perf trees.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] perf: Remove newline character from perror() argument
2010-10-26 14:34 ` Matt Fleming
@ 2010-10-26 14:52 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2010-10-26 14:52 UTC (permalink / raw)
To: Matt Fleming
Cc: linux-kernel, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Frederic Weisbecker, Tom Zanussi
Em Tue, Oct 26, 2010 at 03:34:48PM +0100, Matt Fleming escreveu:
> On Sat, Aug 28, 2010 at 12:52:51PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Sat, Aug 28, 2010 at 04:46:19PM +0100, Matt Fleming escreveu:
> > > 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
> >
> > Thanks, applying.
> >
> > - Arnaldo
>
> Hi Arnaldo,
>
> Whatever happend to this? I can't see it in any of the perf trees.
Checking... Will fold it in if I missed it, thanks for the reminder!
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:perf/urgent] perf record: Remove newline character from perror() argument
2010-08-28 15:46 [PATCH] perf: Remove newline character from perror() argument Matt Fleming
2010-08-28 15:52 ` Arnaldo Carvalho de Melo
@ 2010-10-27 11:01 ` tip-bot for Matt Fleming
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Matt Fleming @ 2010-10-27 11:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, paulus, hpa, mingo, tzanussi, peterz, fweisbec,
matt, tglx, acme, mingo
Commit-ID: 0ab7368f8dad561b6164b3e942cab00f9565bd37
Gitweb: http://git.kernel.org/tip/0ab7368f8dad561b6164b3e942cab00f9565bd37
Author: Matt Fleming <matt@console-pimps.org>
AuthorDate: Sat, 28 Aug 2010 16:46:19 +0100
Committer: Arnaldo Carvalho de Melo <acme@felicio.ghostprotocols.net>
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@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;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-27 11:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-28 15:46 [PATCH] perf: Remove newline character from perror() argument Matt Fleming
2010-08-28 15:52 ` Arnaldo Carvalho de Melo
2010-10-26 14:34 ` Matt Fleming
2010-10-26 14:52 ` Arnaldo Carvalho de Melo
2010-10-27 11:01 ` [tip:perf/urgent] perf record: " tip-bot for Matt Fleming
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.