2aacef
From a2cb8467652ca36bd5420dc685d5e6b76014c3e1 Mon Sep 17 00:00:00 2001
2aacef
From: Yu Watanabe <watanabe.yu+github@gmail.com>
2aacef
Date: Tue, 1 Nov 2022 13:10:20 +0900
2aacef
Subject: [PATCH] parse_hwdb: allow negative value for EVDEV_ABS_ properties
2aacef
2aacef
(cherry picked from commit f0b75cda5a3eac3fe953fd1a429a39e077387997)
2aacef
2aacef
Related #2138081
2aacef
---
2aacef
 hwdb.d/parse_hwdb.py | 2 +-
2aacef
 1 file changed, 1 insertion(+), 1 deletion(-)
2aacef
2aacef
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
2aacef
index c0dde75650..5a1ae5a6a0 100755
2aacef
--- a/hwdb.d/parse_hwdb.py
2aacef
+++ b/hwdb.d/parse_hwdb.py
2aacef
@@ -202,7 +202,7 @@ def property_grammar():
2aacef
                 ]
2aacef
     abs_props = [Regex(r'EVDEV_ABS_[0-9a-f]{2}')('NAME')
2aacef
                  - Suppress('=') -
2aacef
-                 Word(nums + ':')('VALUE')
2aacef
+                 Word('-' + nums + ':')('VALUE')
2aacef
                 ]
2aacef
 
2aacef
     grammar = Or(fixed_props + kbd_props + abs_props) + EOL