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:
parent
85aff1586f
commit
6c2a407426
|
@ -234,7 +234,7 @@ void st_set_trace_file_enabled(bool enable)
|
||||||
.x1 = HEADER_VERSION,
|
.x1 = HEADER_VERSION,
|
||||||
};
|
};
|
||||||
|
|
||||||
trace_fp = fopen(trace_file_name, "w");
|
trace_fp = fopen(trace_file_name, "wb");
|
||||||
if (!trace_fp) {
|
if (!trace_fp) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue