Commit 024431b3d8bf87b57fbbf01a9b5d273f86b0e6a7

Authored by Filip Navara
Committed by Anthony Liguori
1 parent 406c8df3

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>
Showing 1 changed file with 1 additions and 1 deletions
... ... @@ -1990,7 +1990,7 @@ static int net_dump_init(Monitor *mon, VLANState *vlan, const char *device,
1990 1990  
1991 1991 s = qemu_malloc(sizeof(DumpState));
1992 1992  
1993   - s->fd = open(filename, O_CREAT | O_WRONLY, 0644);
  1993 + s->fd = open(filename, O_CREAT | O_WRONLY | O_BINARY, 0644);
1994 1994 if (s->fd < 0) {
1995 1995 config_error(mon, "-net dump: can't open %s\n", filename);
1996 1996 return -1;
... ...