qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init.
@ 2009-06-17 17:48 Filip Navara
  0 siblings, 0 replies; 2+ messages in thread
From: Filip Navara @ 2009-06-17 17:48 UTC (permalink / raw)
  To: qemu-devel

Fix the pcap dumps on Win32 and other systems where O_BINARY is required.

Signed-off-by: Filip Navara <filip.navara@gmail.com 
<mailto:filip.navara@gmail.com>>

---
  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

^ permalink raw reply related	[flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init.
@ 2009-06-14  8:47 Filip Navara
  0 siblings, 0 replies; 2+ messages in thread
From: Filip Navara @ 2009-06-14  8:47 UTC (permalink / raw)
  To: qemu-devel


[-- Attachment #1.1: Type: text/plain, Size: 127 bytes --]

Fix the pcap dumps on Win32 and other systems where O_BINARY is required.
Signed-off-by: Filip Navara <filip.navara@gmail.com>

[-- Attachment #1.2: Type: text/html, Size: 217 bytes --]

[-- Attachment #2: 0001-Add-O_BINARY-to-open-call-in-net_dump_init.patch --]
[-- Type: application/octet-stream, Size: 915 bytes --]

From 76c7495fe5840edee1a04979eba71f82a2c504af Mon Sep 17 00:00:00 2001
From: Filip Navara <filip.navara@gmail.com>
Date: Sun, 14 Jun 2009 10:43:06 +0200
Subject: [PATCH] Add O_BINARY to open call in net_dump_init.

---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-17 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-17 17:48 [Qemu-devel] [PATCH] Add O_BINARY to open call in net_dump_init Filip Navara
  -- strict thread matches above, loose matches on Subject: below --
2009-06-14  8:47 Filip Navara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).