]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
trace: use binary file open mode in simpletrace
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 5 Sep 2011 17:31:21 +0000 (18:31 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 21 Sep 2011 10:30:10 +0000 (11:30 +0100)
For Windows portability the simple trace backend must use the 'b' file
open mode.  This prevents the stdio library from mangling 0x0a/0x0d
newline characters.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
trace/simple.c

index 885764a031b8964131716ade1509445d3889927e..b639dda806e82f2532f11de889c5d5e02e2da36f 100644 (file)
@@ -234,7 +234,7 @@ void st_set_trace_file_enabled(bool enable)
             .x1 = HEADER_VERSION,
         };
 
-        trace_fp = fopen(trace_file_name, "w");
+        trace_fp = fopen(trace_file_name, "wb");
         if (!trace_fp) {
             return;
         }