Skip to content

Commit

Permalink
perf top: Add missing newline if the 'uid' is invalid
Browse files Browse the repository at this point in the history
Add missing newline if the 'uid' is invalid:

  hubble:~> perf top --stdio -u help
  Error:
  Invalid User: helphubble:~>

Fixed by this patch:

  comet:~/tip/tools/perf> perf top --stdio -u help
  Error:
  Invalid User: help
  comet:~/tip/tools/perf>

Signed-off-by: Ingo Molnar <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
Ingo Molnar authored and acmel committed Nov 14, 2013
1 parent b222213 commit ea432a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,15 +1172,15 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
status = target__validate(target);
if (status) {
target__strerror(target, status, errbuf, BUFSIZ);
ui__warning("%s", errbuf);
ui__warning("%s\n", errbuf);
}

status = target__parse_uid(target);
if (status) {
int saved_errno = errno;

target__strerror(target, status, errbuf, BUFSIZ);
ui__error("%s", errbuf);
ui__error("%s\n", errbuf);

status = -saved_errno;
goto out_delete_evlist;
Expand Down

0 comments on commit ea432a8

Please sign in to comment.