[systemd-devel] [PATCH 2/5] udev: builtin - use RUN rather than IMPORT where it makes sense
Tom Gundersen
teg at jklm.no
Mon Mar 18 06:17:25 PDT 2013
The 'kmod' and 'firmware' builtin's do not set any variables, so no need to use
IMPORT. Use RUN as is already the case for the 'uaccess' builtin.
---
rules/50-udev-default.rules | 2 +-
rules/80-drivers.rules | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
index 5d8bde5..56e4c8b 100644
--- a/rules/50-udev-default.rules
+++ b/rules/50-udev-default.rules
@@ -64,5 +64,5 @@ SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
-SUBSYSTEM=="firmware", ACTION=="add", IMPORT{builtin}="firmware"
+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
index a0615cc..50523e4 100644
--- a/rules/80-drivers.rules
+++ b/rules/80-drivers.rules
@@ -2,12 +2,12 @@
ACTION=="remove", GOTO="drivers_end"
-DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", IMPORT{builtin}="kmod load tifm_sd"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", IMPORT{builtin}="kmod load tifm_ms"
-SUBSYSTEM=="memstick", IMPORT{builtin}="kmod load ms_block mspro_block"
-SUBSYSTEM=="i2o", IMPORT{builtin}="kmod load i2o_block"
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
+SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN{builtin}="kmod load i2o_block"
SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}="kmod load ppdev"
-KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", IMPORT{builtin}="kmod load sm_ftl"
+KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}="kmod load sm_ftl"
LABEL="drivers_end"
--
1.8.2
More information about the systemd-devel
mailing list