From: "Hervé Poussineau" <hpoussin@reactos.org>
To: qemu-devel@nongnu.org
Cc: "Hervé Poussineau" <hpoussin@reactos.org>
Subject: [Qemu-devel] [PATCH 1/2] net: truncate output file when using dump backend
Date: Wed, 30 Nov 2011 21:35:37 +0100 [thread overview]
Message-ID: <1322685338-3825-2-git-send-email-hpoussin@reactos.org> (raw)
In-Reply-To: <1322685338-3825-1-git-send-email-hpoussin@reactos.org>
This prevents data of a previous run to be seen in the new dump file.
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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
next prev parent reply other threads:[~2011-11-30 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 20:35 [Qemu-devel] [PATCH v2 0/2] net: fix some problems with dump backend Hervé Poussineau
2011-11-30 20:35 ` Hervé Poussineau [this message]
2011-11-30 20:35 ` [Qemu-devel] [PATCH 2/2] net: store guest timestamp in dump file instead of time since guest startup Hervé Poussineau
2011-12-01 8:02 ` [Qemu-devel] [PATCH v2 0/2] net: fix some problems with dump backend Stefan Hajnoczi
2011-12-20 22:17 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2011-11-06 21:52 [Qemu-devel] [PATCH 1/2] net: truncate output file when using " Hervé Poussineau
2011-11-07 10:08 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322685338-3825-2-git-send-email-hpoussin@reactos.org \
--to=hpoussin@reactos.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).