diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-11-03 14:17:53 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-11-03 14:17:53 +0100 |
commit | 3a7771c9c499d9d0a1ceb35cbbdfde9c6eefcb0a (patch) | |
tree | e000137511fc1bab33a884bfffdf8038c65fda70 /tools/make-autosuspend-rules.py | |
parent | d3dcf4e3b95e3d3149ee169dc13b43e2e1a02cec (diff) | |
download | systemd-3a7771c9c499d9d0a1ceb35cbbdfde9c6eefcb0a.tar.gz |
Partially revert "hwdb: add trailing ":*" everywhere"
This reverts commit c0443b97b71d5f70a0622061f589307bec5502c6.
I got various cases wrong:
"usb:v04F3p2B7Cd5912dc00dsc00dp00ic03isc00ip00in00"
"usb:v0627p0001:QEMU USB Tablet"
"input:b0003v0627p0001e0001-e0,1,2,4,k110,111,112,r0,1,8,B,am4,lsfw"
OTOH:
-evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV:*
+evdev:name:ETPS/2 Elantech Touchpad:dmi:*svnASUSTeKComputerInc.:pnN53SV*
is OK. Other parts follow after 'pn'.
-mouse:*:name:*Trackball*:*
-mouse:*:name:*trackball*:*
-mouse:*:name:*TrackBall*:*
+mouse:*:name:*Trackball*:
+mouse:*:name:*trackball*:
+mouse:*:name:*TrackBall*:
... and anything else with :name should be OK too, because our imports always
include ":" at the end:
IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'"
Including '*' at the end makes the pattern work even if we decide to add
something to the match string later.
Fixes #17499.
Diffstat (limited to 'tools/make-autosuspend-rules.py')
-rwxr-xr-x | tools/make-autosuspend-rules.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/make-autosuspend-rules.py b/tools/make-autosuspend-rules.py index 8114522a1c..a20edc0f34 100755 --- a/tools/make-autosuspend-rules.py +++ b/tools/make-autosuspend-rules.py @@ -7,18 +7,18 @@ import chromiumos.gen_autosuspend_rules -print('# pci:v<00VENDOR>d<00DEVICE>:* (8 uppercase hexadecimal digits twice)') +print('# pci:v<00VENDOR>d<00DEVICE> (8 uppercase hexadecimal digits twice)') for entry in chromiumos.gen_autosuspend_rules.PCI_IDS: vendor, device = entry.split(':') vendor = int(vendor, 16) device = int(device, 16) - print('pci:v{:08X}d{:08X}:*'.format(vendor, device)) + print('pci:v{:08X}d{:08X}*'.format(vendor, device)) -print('# usb:v<VEND>p<PROD>:* (4 uppercase hexadecimal digits twice)') +print('# usb:v<VEND>p<PROD> (4 uppercase hexadecimal digits twice)') for entry in chromiumos.gen_autosuspend_rules.USB_IDS: vendor, product = entry.split(':') vendor = int(vendor, 16) product = int(product, 16) - print('usb:v{:04X}p{:04X}:*'.format(vendor, product)) + print('usb:v{:04X}p{:04X}*'.format(vendor, product)) print(' ID_AUTOSUSPEND=1') |