summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-08-08 07:54:05 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-08-08 13:05:30 +0200
commit074d90926fec26c305e23a7e9acb3e59c576c859 (patch)
tree64f2894ed3333bc4ee01224538f454f8017ac33c /rules.d
parentbusctl: fix showing array of dictionary in JSON format (diff)
downloadsystemd-074d90926fec26c305e23a7e9acb3e59c576c859.tar.xz
systemd-074d90926fec26c305e23a7e9acb3e59c576c859.zip
udev: set ID_NAME and ID_SERIAL to MMC/memstick devices again
Fixes a bug introduced by 998db5871fea331ec00b26a3a3f5271df040a905. Fixes #28671.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/60-persistent-storage.rules.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/rules.d/60-persistent-storage.rules.in b/rules.d/60-persistent-storage.rules.in
index c89d8a3e0e..d5e0f5f705 100644
--- a/rules.d/60-persistent-storage.rules.in
+++ b/rules.d/60-persistent-storage.rules.in
@@ -87,16 +87,18 @@ KERNEL=="pmem*", ATTRS{uuid}=="?*", SYMLINK+="disk/by-id/pmem-$attr{uuid}$env{.P
KERNEL=="sd*|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}$env{.PART_SUFFIX}"
# MMC
-KERNEL!="mmcblk[0-9]|mmcblk[0-9]p[0-9]*", GOTO="mmc_end"
-SUBSYSTEMS!="mmc", GOTO="mmc_end"
+KERNEL=="mmcblk[0-9]|mmcblk[0-9]p[0-9]*", SUBSYSTEMS=="mmc", GOTO="mmc_start"
+GOTO="mmc_end"
+LABEL="mmc_start"
ATTRS{name}=="?*", ENV{ID_NAME}="$attr{name}"
ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}"
ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}$env{.PART_SUFFIX}"
LABEL="mmc_end"
# Memstick
-KERNEL!="msblk[0-9]|mspblk[0-9]|msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", GOTO="memstick_end"
-SUBSYSTEMS!="memstick", GOTO="memstick_end"
+KERNEL=="msblk[0-9]|mspblk[0-9]|msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", SUBSYSTEMS=="memstick", GOTO="memstick_start"
+GOTO="memstick_end"
+LABEL="memstick_start"
ATTRS{name}=="?*", ENV{ID_NAME}="$attr{name}"
ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}"
ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}$env{.PART_SUFFIX}"