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>
master
Stefan Hajnoczi 2010-10-05 14:28:51 +01:00 committed by Blue Swirl
parent 9a85d39447
commit 5eb5527b1e
1 changed files with 1 additions and 2 deletions

View File

@ -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 *}