]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: allow spaces in usb: matches and similar patterns
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 17 Jul 2020 05:44:10 +0000 (07:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 17 Jul 2020 05:44:10 +0000 (07:44 +0200)
In the past we didn't have any matches like that, so the parser was stricter
than necessary, but now we have, so allow that.

hwdb.d/parse_hwdb.py

index 8e1b5fdafa4c600279f8c3a4288bef31610cdd82..c9851ca64c9bd2eccd634a2a783e47173c599331 100755 (executable)
@@ -87,7 +87,7 @@ def hwdb_grammar():
                 for category, conn in TYPES.items())
 
     matchline_typed = Combine(prefix + Word(printables + ' ' + '®'))
-    matchline_general = Combine(Or(GENERAL_MATCHES) + ':' + Word(printables))
+    matchline_general = Combine(Or(GENERAL_MATCHES) + ':' + Word(printables + ' ' + '®'))
     matchline = (matchline_typed | matchline_general) + EOL
 
     propertyline = (White(' ', exact=1).suppress() +