[systemd-devel] [PATCH 04/10] rules: set default polling interval on removable devices as well
Jon Severinsson
jon at severinsson.net
Wed Jul 16 03:09:50 PDT 2014
From: Martin Pitt <martin.pitt at ubuntu.com>
The events_dfl_poll_msecs rule will not trigger if "block" is not a module, but
built in. This will avoid udisks etc. having to poll from userspace, and
provide proper ejection when the hardware eject button is pressed.
Bug-Debian: https://bugs.debian.org/713877
Bug-Ubuntu: https://launchpad.net/bugs/890592
---
rules/60-persistent-storage.rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 475b151..40b4eb9 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -10,6 +10,7 @@ ACTION=="remove", GOTO="persistent_storage_end"
# enable in-kernel media-presence polling
ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", ATTR{parameters/events_dfl_poll_msecs}="2000"
+ACTION=="add", ATTR{removable}=="1", ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2000"
SUBSYSTEM!="block", GOTO="persistent_storage_end"
--
2.0.1
More information about the systemd-devel
mailing list