From e02d2a979de8797d879f1470de66b405425d6bae Mon Sep 17 00:00:00 2001
Message-Id: <e02d2a979de8797d879f1470de66b405425d6bae.1349887753.git.minovotn@redhat.com>
In-Reply-To: <8366ff5a206b0f75edd17a4a78f7c389ebb81d49.1349887753.git.minovotn@redhat.com>
References: <8366ff5a206b0f75edd17a4a78f7c389ebb81d49.1349887753.git.minovotn@redhat.com>
From: Alon Levy <alevy@redhat.com>
Date: Sun, 7 Oct 2012 14:26:43 +0200
Subject: [PATCH 05/11] tracetool: support format strings containing
 parenthesis

RH-Author: Alon Levy <alevy@redhat.com>
Message-id: <1349620009-26192-2-git-send-email-alevy@redhat.com>
Patchwork-id: 42769
O-Subject: [PATCH RHEL-6.4 v2 1/7] tracetool: support format strings containing parenthesis
Bugzilla: 820136
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Uri Lublin <uril@redhat.com>

Use the double percent operator instead of the single percent operator
to use the longest match, fixing invalid produced trace.h files:

trace-events:
func(int x, int y) "%d (%y)"
=>
trace.h:
func(int x, int y) "%d (%y) {

Fixed to:
func(int x, int y) {

Signed-off-by: Alon Levy <alevy@redhat.com>

upstream: not in upstream, upstream moved on to a rewritten tracetool.
---
 tracetool | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 tracetool | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tracetool b/tracetool
index da05df7..f489f43 100644
--- a/tracetool
+++ b/tracetool
@@ -48,7 +48,7 @@ get_args()
 {
     local args
     args=${1#*\(}
-    args=${args%\)*}
+    args=${args%%\)*}
     echo "$args"
 }
 
-- 
1.7.11.4

