From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5cZH-0001Yu-99 for qemu-devel@nongnu.org; Mon, 19 Sep 2011 08:03:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5cZB-0001GY-Ip for qemu-devel@nongnu.org; Mon, 19 Sep 2011 08:03:23 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:54239) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5cZB-00018F-Bt for qemu-devel@nongnu.org; Mon, 19 Sep 2011 08:03:17 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8JC2wi9027317 for ; Mon, 19 Sep 2011 12:02:58 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8JC2vSU2326652 for ; Mon, 19 Sep 2011 13:02:57 +0100 Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8JC2vj2005597 for ; Mon, 19 Sep 2011 06:02:57 -0600 From: Stefan Hajnoczi Date: Mon, 19 Sep 2011 13:02:53 +0100 Message-Id: <1316433773-17832-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1316433773-17832-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1316433773-17832-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2 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: Paolo Bonzini , 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 e29e001..b729c34 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