[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/5] trace: use binary file open mode in simpletrace
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 4/5] trace: use binary file open mode in simpletrace |
Date: |
Wed, 21 Sep 2011 11:36:36 +0100 |
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 <address@hidden>
---
trace/simple.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/trace/simple.c b/trace/simple.c
index 885764a..b639dda 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -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;
}
--
1.7.5.4
- [Qemu-devel] [PULL 0/5] Tracing patches, Stefan Hajnoczi, 2011/09/21
- [Qemu-devel] [PATCH 1/5] trace: allow trace events with string arguments, Stefan Hajnoczi, 2011/09/21
- [Qemu-devel] [PATCH 2/5] MAINTAINERS: add tracing subsystem, Stefan Hajnoczi, 2011/09/21
- [Qemu-devel] [PATCH 3/5] trace: portable simple trace backend using glib, Stefan Hajnoczi, 2011/09/21
- [Qemu-devel] [PATCH 4/5] trace: use binary file open mode in simpletrace,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 5/5] trace: Update docs to use example events that exist, Stefan Hajnoczi, 2011/09/21
- Re: [Qemu-devel] [PULL 0/5] Tracing patches, Anthony Liguori, 2011/09/22