From 074d90926fec26c305e23a7e9acb3e59c576c859 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 8 Aug 2023 14:54:05 +0900 Subject: udev: set ID_NAME and ID_SERIAL to MMC/memstick devices again Fixes a bug introduced by 998db5871fea331ec00b26a3a3f5271df040a905. Fixes #28671. --- rules.d/60-persistent-storage.rules.in | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'rules.d') 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}" -- cgit v1.2.3