[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init.
From: |
Filip Navara |
Subject: |
[Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init. |
Date: |
Wed, 17 Jun 2009 19:48:08 +0200 |
User-agent: |
Postbox 1.0b12 (Windows/2009051123) |
Fix the pcap dumps on Win32 and other systems where O_BINARY is required.
Signed-off-by: Filip Navara <address@hidden
<mailto:address@hidden>>
---
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