sim-card
/
qemu
Archived
10
0
Fork 0

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
1 changed files with 1 additions and 1 deletions

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