aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2016-06-20 16:39:26 +0800
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-06-21 13:31:17 +1000
commitff42a814deaf55691b037f15d01f3f218fcaf1a8 (patch)
tree99f9f056dac664492b3aaff350c7d9506fd4f3e7 /external
parentd4d436cb6ea24efb3461340fd5c2ee5b486c6b8a (diff)
downloadskiboot-ff42a814deaf55691b037f15d01f3f218fcaf1a8.zip
skiboot-ff42a814deaf55691b037f15d01f3f218fcaf1a8.tar.gz
skiboot-ff42a814deaf55691b037f15d01f3f218fcaf1a8.tar.bz2
fwts/generate-fwts-olog: Fix regex matches to allow more printf formats
We currently aren't handling the 'll' length modifier, or widths starting with zero (eg %016x). The former is becase we have the shorter 'l' match in the group first (so borking on the second l). The latter is because we don't allow a leading zero on width matches. This change fixes those issues. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rwxr-xr-xexternal/fwts/generate-fwts-olog4
1 files changed, 2 insertions, 2 deletions
diff --git a/external/fwts/generate-fwts-olog b/external/fwts/generate-fwts-olog
index c9d8259..7663d34 100755
--- a/external/fwts/generate-fwts-olog
+++ b/external/fwts/generate-fwts-olog
@@ -109,9 +109,9 @@ def message_to_pattern(loc, msg):
# Somewhat-simplified match for a %-template
template_re = re.compile(
'%(?P<flag>[-#0 +]*)'
- '(?P<width>(?:[1-9][0-9]*|\*))?'
+ '(?P<width>(?:[0-9]*|\*))?'
'(?P<precision>\.*(?:[1-9][0-9]*|\*))?'
- '(?:hh|h|l|ll|L|j|z|t)?'
+ '(?:hh|h|ll|l|L|j|z|t)?'
'(?P<conversion>[a-zA-Z%])')
global is_regex
is_regex = False