[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backe
From: |
Hervé Poussineau |
Subject: |
[Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend |
Date: |
Sun, 6 Nov 2011 22:52:04 +0100 |
Signed-off-by: Hervé Poussineau <address@hidden>
---
net/dump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/dump.c b/net/dump.c
index 0d0cbb2..8132411 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;
--
1.7.6.3
- [Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend,
Hervé Poussineau <=