]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb_parser: make sure that our patterns match the full property 4844/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 10 Dec 2016 07:28:24 +0000 (02:28 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 10 Dec 2016 07:28:24 +0000 (02:28 -0500)
We would catch stuff like:
 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0.0., 0
but not
 ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 0.0.
because the match would stop at the next-to-last char. Fix that
by requiring a line end.

hwdb/parse_hwdb.py

index ec97ed780722986c6f2a7e9ea95913afa6e0f693..18f13edd0a25830d3efea9e49bfc61d1162fa292 100755 (executable)
@@ -123,7 +123,7 @@ def property_grammar():
                  Word(nums + ':')('VALUE')
                 ]
 
-    grammar = Or(fixed_props + kbd_props + abs_props)
+    grammar = Or(fixed_props + kbd_props + abs_props) + EOL
 
     return grammar