From: stefanha@linux.vnet.ibm.com
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Subject: [Qemu-devel] [PATCH v3 2/2] trace: use binary file open mode in simpletrace
Date: Tue, 20 Sep 2011 13:17:07 +0100 [thread overview]
Message-ID: <1316521027-18707-3-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1316521027-18707-1-git-send-email-stefanha@linux.vnet.ibm.com>
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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>
---
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
prev parent reply other threads:[~2011-09-20 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-20 12:17 [Qemu-devel] [PATCH v3 0/2] Make simpletrace work on Windows stefanha
2011-09-20 12:17 ` [Qemu-devel] [PATCH v3 1/2] trace: portable simple trace backend using glib stefanha
2011-09-20 12:17 ` stefanha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316521027-18707-3-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).