From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1xWI-00006Q-TS for qemu-devel@nongnu.org; Fri, 09 Sep 2011 05:37:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1xWG-0008Hh-N2 for qemu-devel@nongnu.org; Fri, 09 Sep 2011 05:37:10 -0400 Received: from mtagate7.uk.ibm.com ([194.196.100.167]:45665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1xWG-0008Gu-G1 for qemu-devel@nongnu.org; Fri, 09 Sep 2011 05:37:08 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p899b7JL004943 for ; Fri, 9 Sep 2011 09:37:07 GMT Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p899b6FD2273522 for ; Fri, 9 Sep 2011 10:37:06 +0100 Received: from d06av06.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p899b6ke006174 for ; Fri, 9 Sep 2011 03:37:06 -0600 From: Stefan Hajnoczi Date: Fri, 9 Sep 2011 10:37:02 +0100 Message-Id: <1315561022-25386-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1315561022-25386-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1315561022-25386-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/2] trace: use binary file open mode in simpletrace List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Jan Kiszka , Stefan Hajnoczi 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 --- trace/simple.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/trace/simple.c b/trace/simple.c index 92c315a..2f7dfbc 100644 --- a/trace/simple.c +++ b/trace/simple.c @@ -230,7 +230,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