From: Filip Navara <filip.navara@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init.
Date: Wed, 17 Jun 2009 19:48:08 +0200 [thread overview]
Message-ID: <4A392C58.4090609@gmail.com> (raw)
Fix the pcap dumps on Win32 and other systems where O_BINARY is required.
Signed-off-by: Filip Navara <filip.navara@gmail.com
<mailto:filip.navara@gmail.com>>
---
net.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net.c b/net.c
index af9de73..65810a0 100644
--- a/net.c
+++ b/net.c
@@ -124,7 +124,6 @@
#include "libslirp.h"
#endif
-
static VLANState *first_vlan;
/***********************************************************/
@@ -1990,7 +1989,7 @@ static int net_dump_init(Monitor *mon, VLANState
*vlan, const char *device,
s = qemu_malloc(sizeof(DumpState));
- s->fd = open(filename, O_CREAT | O_WRONLY, 0644);
+ s->fd = open(filename, O_CREAT | O_WRONLY | O_BINARY, 0644);
if (s->fd < 0) {
config_error(mon, "-net dump: can't open %s\n", filename);
return -1;
--
1.6.3.msysgit.0
next reply other threads:[~2009-06-17 17:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 17:48 Filip Navara [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-06-14 8:47 [Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init Filip Navara
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=4A392C58.4090609@gmail.com \
--to=filip.navara@gmail.com \
--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 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.