From patchwork Tue Sep 20 12:17:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 115518 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 71B28B71D7 for ; Tue, 20 Sep 2011 22:17:39 +1000 (EST) Received: from localhost ([::1]:42175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5zGS-0000BR-Id for incoming@patchwork.ozlabs.org; Tue, 20 Sep 2011 08:17:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5zGF-0008J8-RC for qemu-devel@nongnu.org; Tue, 20 Sep 2011 08:17:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5zGE-0005eY-AQ for qemu-devel@nongnu.org; Tue, 20 Sep 2011 08:17:15 -0400 Received: from mtagate7.uk.ibm.com ([194.196.100.167]:33786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5zGE-0005eG-25 for qemu-devel@nongnu.org; Tue, 20 Sep 2011 08:17:14 -0400 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate7.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8KCHCiR013416 for ; Tue, 20 Sep 2011 12:17:12 GMT Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8KCHCgI2482282 for ; Tue, 20 Sep 2011 13:17:12 +0100 Received: from d06av12.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8KCHBNR005318 for ; Tue, 20 Sep 2011 06:17:11 -0600 Received: from localhost (dyn-9-174-219-31.manchester-maybrook.uk.ibm.com [9.174.219.31]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p8KCHBPW005314; Tue, 20 Sep 2011 06:17:11 -0600 From: stefanha@linux.vnet.ibm.com To: Date: Tue, 20 Sep 2011 13:17:07 +0100 Message-Id: <1316521027-18707-3-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1316521027-18707-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1316521027-18707-1-git-send-email-stefanha@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.196.100.167 Cc: Paolo Bonzini , Stefan Hajnoczi , Jan Kiszka Subject: [Qemu-devel] [PATCH v3 2/2] trace: use binary file open mode in simpletrace X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: 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 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; }