提交 024431b3 编写于 作者: F Filip Navara 提交者: Anthony Liguori

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: NFilip Navara <filip.navara@gmail.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 406c8df3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册