From: Stefan Hajnoczi Date: Mon, 5 Sep 2011 17:31:21 +0000 (+0100) Subject: trace: use binary file open mode in simpletrace X-Git-Tag: v1.0-rc0~207^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6c2a40742602c3cbe6a3905229dd539d7c311550;p=thirdparty%2Fqemu.git trace: use binary file open mode in simpletrace 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 --- diff --git a/trace/simple.c b/trace/simple.c index 885764a031b..b639dda806e 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -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; }