summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2010-10-05 14:28:51 +0100
committerBlue Swirl <blauwirbel@gmail.com>2010-10-09 08:16:50 +0000
commit5eb5527b1eaec0955a91f8532424bb45611b7b0c (patch)
tree9e56b23a4d6b416d7ac1920865464f64433cf742
parent9a85d3944715c709d740edb987b84bd657b9d7ef (diff)
trace: Don't strip lines containing '#' arbitrarily
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 <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rwxr-xr-xtracetool3
1 files changed, 1 insertions, 2 deletions
diff --git a/tracetool b/tracetool
index 534cc709f4..63e3e291cc 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 *}