projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22a4f65
)
perf_counter tools: Guard against record damaging existing files
author
Mike Galbraith
<efault@gmx.de>
Thu, 28 May 2009 14:28:53 +0000
(16:28 +0200)
committer
Ingo Molnar
<mingo@elte.hu>
Mon, 1 Jun 2009 18:10:24 +0000
(20:10 +0200)
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Documentation/perf_counter/builtin-record.c
patch
|
blob
|
blame
|
history
diff --git
a/Documentation/perf_counter/builtin-record.c
b/Documentation/perf_counter/builtin-record.c
index 23d1224ce98c2d05bcbd36bc42ca64e7042e45fd..96bfb7c5f1e4fd67b7c94c84823f448642cf6318 100644
(file)
--- a/
Documentation/perf_counter/builtin-record.c
+++ b/
Documentation/perf_counter/builtin-record.c
@@
-340,7
+340,7
@@
static int __cmd_record(int argc, const char **argv)
assert(nr_cpus <= MAX_NR_CPUS);
assert(nr_cpus >= 0);
- output = open(output_name, O_CREAT|O_RDWR, S_IRWXU);
+ output = open(output_name, O_CREAT|O_
EXCL|O_
RDWR, S_IRWXU);
if (output < 0) {
perror("failed to create output file");
exit(-1);