From 024431b3d8bf87b57fbbf01a9b5d273f86b0e6a7 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 17 Jun 2009 19:48:08 +0200 Subject: [PATCH] Add O_BINARY to open call in net_dump_init. Fix the pcap dumps on Win32 and other systems where O_BINARY is required. Signed-off-by: Filip Navara Signed-off-by: Anthony Liguori --- net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net.c b/net.c index c83999b03a..9f9e3632ac 100644 --- a/net.c +++ b/net.c @@ -1990,7 +1990,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;