summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-08-19 14:50:35 +0200
committerIngo Molnar <mingo@elte.hu>2009-08-24 09:24:01 +0200
commit96d6e48bc6b38342a59ccd23e25907d12caaeaf8 (patch)
treeb770d9e94545e198e120fac31f650600a855f689 /tools/perf/builtin-report.c
parent6e086437f35ad9fda448711732c4ce0f82aad569 (diff)
parent4464fcaa9cbfc9c551956b48af203e2f775ca892 (diff)
downloadop-kernel-dev-96d6e48bc6b38342a59ccd23e25907d12caaeaf8.zip
op-kernel-dev-96d6e48bc6b38342a59ccd23e25907d12caaeaf8.tar.gz
Merge branch 'perfcounters/urgent' into perfcounters/core
Conflicts: tools/perf/builtin-annotate.c tools/perf/builtin-report.c Merge reason: resolve these conflicts. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 3fc0d47..d2e2882 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -37,6 +37,7 @@ static char *dso_list_str, *comm_list_str, *sym_list_str,
static struct strlist *dso_list, *comm_list, *sym_list;
static char *field_sep;
+static int force;
static int input;
static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
@@ -1404,6 +1405,11 @@ static int __cmd_report(void)
exit(-1);
}
+ if (!force && (input_stat.st_uid != geteuid())) {
+ fprintf(stderr, "file: %s not owned by current user\n", input_name);
+ exit(-1);
+ }
+
if (!input_stat.st_size) {
fprintf(stderr, "zero-sized file, nothing to do!\n");
exit(0);
@@ -1615,6 +1621,7 @@ static const struct option options[] = {
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
OPT_STRING('k', "vmlinux", &vmlinux_name, "file", "vmlinux pathname"),
+ OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
OPT_BOOLEAN('m', "modules", &modules,
"load module symbols - WARNING: use only with -k and LIVE kernel"),
OPT_BOOLEAN('n', "show-nr-samples", &show_nr_samples,
OpenPOWER on IntegriCloud