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 <stefanha@linux.vnet.ibm.com>
This commit is contained in:
Stefan Hajnoczi 2011-09-05 18:31:21 +01:00
parent 85aff1586f
commit 6c2a407426

View 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;
}