提交 6c2a4074 编写于 作者: S Stefan Hajnoczi

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: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
上级 85aff158
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册