From patchwork Tue Oct 5 13:28:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 66846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 51459B70D4 for ; Wed, 6 Oct 2010 03:48:03 +1100 (EST) Received: from localhost ([127.0.0.1]:36647 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3AgK-0007uX-U0 for incoming@patchwork.ozlabs.org; Tue, 05 Oct 2010 12:48:00 -0400 Received: from [140.186.70.92] (port=48437 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3Abf-0003vA-8J for qemu-devel@nongnu.org; Tue, 05 Oct 2010 12:43:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3Abd-00015y-81 for qemu-devel@nongnu.org; Tue, 05 Oct 2010 12:43:11 -0400 Received: from mtagate5.de.ibm.com ([195.212.17.165]:57462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3Abc-00015U-WB for qemu-devel@nongnu.org; Tue, 05 Oct 2010 12:43:09 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.1/8.13.1) with ESMTP id o95DT2of023779 for ; Tue, 5 Oct 2010 13:29:02 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o95DT0qW2895890 for ; Tue, 5 Oct 2010 15:29:02 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o95DT0Mw019911 for ; Tue, 5 Oct 2010 15:29:00 +0200 Received: from stefan-thinkpad.ibm.com (sig-9-145-201-78.de.ibm.com [9.145.201.78]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id o95DSxxV019881; Tue, 5 Oct 2010 15:29:00 +0200 From: Stefan Hajnoczi To: Date: Tue, 5 Oct 2010 14:28:51 +0100 Message-Id: <1286285333-21003-2-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1286285333-21003-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1286285333-21003-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) Cc: Blue Swirl , Stefan Hajnoczi , Prerna Saxena Subject: [Qemu-devel] [PATCH 2/4] trace: Don't strip lines containing '#' arbitrarily X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Although comment lines must be skipped, the '#' character can occur in valid format strings. Be more careful when checking for comments. Leave comments at the end of the line where they will not interfere with other processing. Signed-off-by: Stefan Hajnoczi --- tracetool | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/tracetool b/tracetool index 534cc70..63e3e29 100755 --- a/tracetool +++ b/tracetool @@ -318,8 +318,7 @@ convert() while read -r str; do # Skip comments and empty lines - str=${str%%#*} - test -z "$str" && continue + test -z "${str%%#*}" && continue # Process the line. The nop backend handles disabled lines. disable=${str%%disable *}