From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGzFD-0001Bk-5L for qemu-devel@nongnu.org; Wed, 17 Jun 2009 13:48:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGzF8-0001A3-BQ for qemu-devel@nongnu.org; Wed, 17 Jun 2009 13:48:18 -0400 Received: from [199.232.76.173] (port=53064 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGzF8-0001A0-3y for qemu-devel@nongnu.org; Wed, 17 Jun 2009 13:48:14 -0400 Received: from mail-fx0-f209.google.com ([209.85.220.209]:58498) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGzF7-0005ug-NT for qemu-devel@nongnu.org; Wed, 17 Jun 2009 13:48:13 -0400 Received: by fxm5 with SMTP id 5so477054fxm.34 for ; Wed, 17 Jun 2009 10:48:12 -0700 (PDT) Message-ID: <4A392C58.4090609@gmail.com> Date: Wed, 17 Jun 2009 19:48:08 +0200 From: Filip Navara MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Fix the pcap dumps on Win32 and other systems where O_BINARY is required. Signed-off-by: Filip Navara > --- 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