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 From: Stefan Hajnoczi Date: Tue, 5 Oct 2010 14:28:51 +0100 Message-Id: <1286285333-21003-2-git-send-email-stefanha@linux.vnet.ibm.com> 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> Subject: [Qemu-devel] [PATCH 2/4] trace: Don't strip lines containing '#' arbitrarily List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , Stefan Hajnoczi , Prerna Saxena 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 *} -- 1.7.1