Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156627
b: refs/heads/master
c: 266e0e2
h: refs/heads/master
i:
  156625: e96ed3b
  156623: 650de98
v: v3
  • Loading branch information
Pierre Habouzit authored and Ingo Molnar committed Aug 9, 2009
1 parent 7375a37 commit d89872c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7eac7e9e726c1b136bd7e0ad6671ce315f48bb18
refs/heads/master: 266e0e219888420a1a7cafc82e82891cf7b5a979
12 changes: 8 additions & 4 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,14 @@ static int __cmd_record(int argc, const char **argv)
signal(SIGCHLD, sig_handler);
signal(SIGINT, sig_handler);

if (!stat(output_name, &st) && !force && !append_file) {
fprintf(stderr, "Error, output file %s exists, use -A to append or -f to overwrite.\n",
output_name);
exit(-1);
if (!stat(output_name, &st) && st.st_size) {
if (!force && !append_file) {
fprintf(stderr, "Error, output file %s exists, use -A to append or -f to overwrite.\n",
output_name);
exit(-1);
}
} else {
append_file = 0;
}

flags = O_CREAT|O_RDWR;
Expand Down

0 comments on commit d89872c

Please sign in to comment.