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