aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dump.c b/net/dump.c
index 0d0cbb2591..81324116f3 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -106,7 +106,7 @@ static int net_dump_init(VLANState *vlan, const char *device,
DumpState *s;
int fd;
- fd = open(filename, O_CREAT | O_WRONLY | O_BINARY, 0644);
+ fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0644);
if (fd < 0) {
error_report("-net dump: can't open %s", filename);
return -1;