diff -r e10eacec8b91 tools/xentrace/xentrace.c --- a/tools/xentrace/xentrace.c Wed Nov 28 22:36:33 2007 +0000 +++ b/tools/xentrace/xentrace.c Thu Nov 29 13:28:10 2007 +0100 @@ -581,7 +581,9 @@ int main(int argc, char **argv) } if ( opts.outfile ) - outfd = open(opts.outfile, O_WRONLY | O_CREAT | O_LARGEFILE, 0644); + outfd = open(opts.outfile, + O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE, + 0644); if(outfd < 0) {