Patchwork [1/6] tracetool: allow ) in trace output string

login
register
mail settings
Submitter Stefan Hajnoczi
Date April 26, 2011, 12:25 p.m.
Message ID <1303820763-6720-2-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/92915/
State New
Headers show

Comments

Stefan Hajnoczi - April 26, 2011, 12:25 p.m.
From: Paolo Bonzini <pbonzini@redhat.com>

Be greedy in matching the trailing "\)*" pattern.  Otherwise, all the
text in the trace string up to the last closed parenthesis is taken as
part of the prototype.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 scripts/tracetool |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/scripts/tracetool b/scripts/tracetool
index 412f695..9912f36 100755
--- a/scripts/tracetool
+++ b/scripts/tracetool
@@ -51,7 +51,7 @@  get_args()
 {
     local args
     args=${1#*\(}
-    args=${args%\)*}
+    args=${args%%\)*}
     echo "$args"
 }