diff options
author | Kay Sievers <kay@pim.off.vrfy.org> | 2005-10-27 21:04:38 +0200 |
---|---|---|
committer | Kay Sievers <kay@pim.off.vrfy.org> | 2005-10-27 21:04:38 +0200 |
commit | c895fd002763d6ae808e820020dc54e74c347fc2 (patch) | |
tree | a69368d7235feefacac6647f96a7163ca10b7228 /udevcontrol.c | |
parent | 916c5e4725ef4558b752c6464deef6492c8ac31a (diff) |
move rules parsing into daemon
The rules files are parsed only once at daemon startup. Every udev
event process will be fork()'d from udevd without exec()'ing the udev
binary. The in-memory rules will be inherited from the daemon itself.
If inotify is available, udevd will reload all rules if any change in
/etc/udev/rules.d/ happens. Otherwise -HUP or "udevcontrol reload_rules"
can be used.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udevcontrol.c')
-rw-r--r-- | udevcontrol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/udevcontrol.c b/udevcontrol.c index 6651e9761e..00b435edc4 100644 --- a/udevcontrol.c +++ b/udevcontrol.c @@ -89,6 +89,8 @@ int main(int argc, char *argv[], char *envp[]) usend_msg.type = UDEVD_STOP_EXEC_QUEUE; else if (!strcmp(arg, "start_exec_queue")) usend_msg.type = UDEVD_START_EXEC_QUEUE; + else if (!strcmp(arg, "reload_rules")) + usend_msg.type = UDEVD_RELOAD_RULES; else if (!strncmp(arg, "log_priority=", strlen("log_priority="))) { intval = (int *) usend_msg.envbuf; val = &arg[strlen("log_priority=")]; @@ -106,6 +108,7 @@ int main(int argc, char *argv[], char *envp[]) " log_priority=<level> set the udev log level for the daemon\n" " stop_exec_queue keep udevd from executing events, queue only\n" " start_exec_queue execute events, flush queue\n" + " reload_rules reloads the rules files\n" " max_childs=<N> maximum number of childs running at the same time\n" " --help print this help text\n\n"); exit(0); |