summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2009-06-17 19:48:08 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-22 10:10:50 -0500
commit12d79d7a4888d6d180741553704ce92b06accbb7 (patch)
tree008134f5e9533d7303dcedba314dcd53dcc7c2c1 /net.c
parent6ec65a05c32208a062c8bd9f1df5287f6c5cad74 (diff)
downloadqemu-12d79d7a4888d6d180741553704ce92b06accbb7.tar.gz
qemu-12d79d7a4888d6d180741553704ce92b06accbb7.tar.bz2
qemu-12d79d7a4888d6d180741553704ce92b06accbb7.zip
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 <filip.navara@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.c')
-rw-r--r--net.c2
1 files changed, 1 insertions, 1 deletions
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;