mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue