]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
perf ui: Rename ui__warning_paranoid to ui__error_paranoid
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Oct 2011 10:02:55 +0000 (08:02 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 26 Oct 2011 15:12:01 +0000 (13:12 -0200)
As it will exit the tool after the user is notified.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-vy06m8xzlvkhr8tk7nylhbng@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/util/debug.c
tools/perf/util/debug.h

index 40088a5848d6d487c7eaff35af7062c69df0162c..6ab58cc99d53effeced21668df5605e634913e6b 100644 (file)
@@ -298,7 +298,7 @@ try_again:
                        int err = errno;
 
                        if (err == EPERM || err == EACCES) {
-                               ui__warning_paranoid();
+                               ui__error_paranoid();
                                exit(EXIT_FAILURE);
                        } else if (err ==  ENODEV && cpu_list) {
                                die("No such device - did you specify"
index d2fc7542e8264ffd89c94e59b5d880980b55374d..31aa82c39e2a31e8adc46cf5cb8c59a1f0f56cd9 100644 (file)
@@ -871,7 +871,7 @@ try_again:
                        int err = errno;
 
                        if (err == EPERM || err == EACCES) {
-                               ui__warning_paranoid();
+                               ui__error_paranoid();
                                goto out_err;
                        }
                        /*
index 155749d74350a670c166ed14d7f8f4629e4bea23..55634038af6b520707e0b729ed0eaa16bff7d1fb 100644 (file)
@@ -57,9 +57,9 @@ void ui__warning(const char *format, ...)
 }
 #endif
 
-void ui__warning_paranoid(void)
+void ui__error_paranoid(void)
 {
-       ui__warning("Permission error - are you root?\n"
+       ui__error("Permission error - are you root?\n"
                    "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n"
                    " -1 - Not paranoid at all\n"
                    "  0 - Disallow raw tracepoint access for unpriv\n"
index 9c59b9551adad1babea7bd985bd2a914f0b10f6f..16cc75227d2b1cb85ec9ae8e72f1c1f07e5ff112 100644 (file)
@@ -21,14 +21,16 @@ static inline int ui_helpline__show_help(const char *format __used, va_list ap _
 
 static inline void ui_progress__update(u64 curr __used, u64 total __used,
                                       const char *title __used) {}
+
+#define ui__error(format, arg...) ui__warning(format, ##arg)
 #else
 extern char ui_helpline__last_msg[];
 int ui_helpline__show_help(const char *format, va_list ap);
 #include "ui/progress.h"
+void ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
 #endif
 
 void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
-void ui__warning_paranoid(void);
-void ui__error(const char *format, ...) __attribute__((format(printf, 1, 2)));
+void ui__error_paranoid(void);
 
 #endif /* __PERF_DEBUG_H */