smdev

suckless mdev
git clone git://git.2f30.org/smdev.git
Log | Files | Refs | README | LICENSE

commit 6599c9ea656da6b55aa06257c656ed85362964d7
parent 063cb06ee9026267aa021b71360d2932c4f009bc
Author: sin <sin@2f30.org>
Date:   Fri, 30 Aug 2013 11:19:26 +0100

Do not try to remove a node if path[0] is !

I think mdev actually runs the command hook for the rule even
if path[0] is ! - we should look into that and fix it in the future.

Diffstat:
smdev.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/smdev.c b/smdev.c @@ -213,6 +213,10 @@ removedev(struct event *ev) char buf[PATH_MAX]; rule = ev->rule; + + if (rule->path && rule->path[0] == '!') + return 0; + parsepath(rule, &rpath, ev->devname); runrulecmd(rule); /* Delete device node */