perf evsel: Fix printing of perf_event_paranoid message
authorDavid Ahern <dsahern@gmail.com>
Sat, 25 May 2013 23:54:00 +0000 (17:54 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 May 2013 13:24:03 +0000 (16:24 +0300)
message is currently shown as:

  Error:
  You may not have permission to collect %sstats.
  Consider tweaking /proc/sys/kernel/perf_event_paranoid:

Note the %sstats. With patch this becomes:

  Error:
  You may not have permission to collect stats.
  Consider tweaking /proc/sys/kernel/perf_event_paranoid:

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1369526040-1368-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c

index 07b1a3ad3e24a4f24a04877e62d43dccce52d8ff..63b6f8c8edf28715d0d2e74cddd284e0d4d093a0 100644 (file)
@@ -1514,7 +1514,7 @@ int perf_evsel__open_strerror(struct perf_evsel *evsel,
        switch (err) {
        case EPERM:
        case EACCES:
-               return scnprintf(msg, size, "%s",
+               return scnprintf(msg, size,
                 "You may not have permission to collect %sstats.\n"
                 "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
                 " -1 - Not paranoid at all\n"