All of lore.kernel.org
 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.