summaryrefslogtreecommitdiffstats
path: root/rules.d/90-iocost.rules
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-04-26 05:05:36 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-04-26 07:50:25 +0200
commitc413ae18b542cbd76c59d61deae49c404bd23de8 (patch)
treedfbfb0fe5682a513e82de30e6346841a41e3d789 /rules.d/90-iocost.rules
parentudev/iocost: fix log message (diff)
downloadsystemd-c413ae18b542cbd76c59d61deae49c404bd23de8.tar.xz
systemd-c413ae18b542cbd76c59d61deae49c404bd23de8.zip
udev/iocost: use ID_MODEL_FROM_DATABASE if exists
To make the rule consistent with 'iocost query'.
Diffstat (limited to '')
-rw-r--r--rules.d/90-iocost.rules6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules.d/90-iocost.rules b/rules.d/90-iocost.rules
index 50f778a0ae..6c31cae56b 100644
--- a/rules.d/90-iocost.rules
+++ b/rules.d/90-iocost.rules
@@ -13,7 +13,11 @@ ENV{DEVTYPE}=="partition", GOTO="iocost_end"
ACTION=="remove", GOTO="iocost_end"
-ENV{ID_MODEL}!="", IMPORT{builtin}="hwdb 'block::name:$env{ID_MODEL}:fwrev:$env{ID_REVISION}:'"
+ENV{.MODEL}=""
+ENV{ID_MODEL}!="", ENV{.MODEL}="$env{ID_MODEL}"
+ENV{ID_MODEL_FROM_DATABASE}!="", ENV{.MODEL}="$env{ID_MODEL_FROM_DATABASE}"
+
+ENV{.MODEL}!="", IMPORT{builtin}="hwdb 'block::name:$env{.MODEL}:fwrev:$env{ID_REVISION}:'"
ENV{IOCOST_SOLUTIONS}!="", RUN+="iocost apply $env{DEVNAME}"