]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
hwdb: allow parser to expect usage of slash sign in value of property
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)
Although in IEEE 1394 unit function list I have a plan to use slash sign
in name of property, current implementation of parser doesn't allow it.
When parsing current entries in database excluded from parser testing, we
can find usage of slash sign in name of property.

This commit adds slash sign in allow list of the parser for my
convenience.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
hwdb.d/parse_hwdb.py

index 26dc415d860d686a7b44d8cb19e4a7cc0ba3d264..2cd4b1c3706ab3d2194ff1bc38fa754f26039fc5 100755 (executable)
@@ -101,7 +101,7 @@ def hwdb_grammar():
     matchline = (matchline_typed | matchline_general) + EOL
 
     propertyline = (White(' ', exact=1).suppress() +
-                    Combine(UDEV_TAG - '=' - Optional(Word(alphanums + '_=:@*.!-;, "'))
+                    Combine(UDEV_TAG - '=' - Optional(Word(alphanums + '_=:@*.!-;, "/'))
                             - Optional(pythonStyleComment)) +
                     EOL)
     propertycomment = White(' ', exact=1) + pythonStyleComment + EOL