qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend
@ 2011-11-06 21:52 Hervé Poussineau
  2011-11-06 21:52 ` [Qemu-devel] [PATCH 2/2] net: store correct timestamp in dump file Hervé Poussineau
  2011-11-07 10:08 ` [Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend Stefan Hajnoczi
  0 siblings, 2 replies; 4+ messages in thread
From: Hervé Poussineau @ 2011-11-06 21:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Hervé Poussineau


Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-07 10:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 21:52 [Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend Hervé Poussineau
2011-11-06 21:52 ` [Qemu-devel] [PATCH 2/2] net: store correct timestamp in dump file Hervé Poussineau
2011-11-07  6:44   ` Mark Wu
2011-11-07 10:08 ` [Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).