summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-07-24 22:18:53 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-07-25 18:56:59 +0200
commit6636b2b6bf07def544dcb4faefe161d27a532692 (patch)
tree6db8861263fb033253826461619e12b90635d469
parentNEWS: fix typo (diff)
downloadsystemd-6636b2b6bf07def544dcb4faefe161d27a532692.tar.xz
systemd-6636b2b6bf07def544dcb4faefe161d27a532692.zip
udev: set ID_PATH properties for all pci, usb, and platform devices
Before c43ff248f94266cfc93e300a2d3d163ed805e55b, the following line in 60-drm.rules also sets ID_PATH for all pci, usb, and platform devices: === ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id" === Unfortunately, some existing rules rely on the unexpected behavior. To keep the backward compatibility, let's set ID_PATH for them. Fixes #28411.
-rw-r--r--rules.d/50-udev-default.rules.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in
index b37e8bd3d5..eb9e239c70 100644
--- a/rules.d/50-udev-default.rules.in
+++ b/rules.d/50-udev-default.rules.in
@@ -17,6 +17,15 @@ SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
+# Before c43ff248f94266cfc93e300a2d3d163ed805e55b, the following line in
+# 60-drm.rules also sets ID_PATH for all pci, usb, and platform devices:
+####
+# ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
+####
+# Unfortunately, some existing rules already rely on the unexpected behavior.
+# To keep the backward compatibility, let's set ID_PATH for them.
+SUBSYSTEM=="pci|usb|platform", IMPORT{builtin}="path_id"
+
ACTION!="add", GOTO="default_end"
SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"