[PATCH] mdev & running commands
Marcin Juszkiewicz
marcin at juszkiewicz.com.pl
Fri Jan 9 13:49:02 UTC 2009
Hi
I am using busybox 1.13.2 on my target devices. As I need fast boot I
switched from udev to mdev. And here I found a problem.
Mdev allows to move/symlink nodes into subdirs. It also allow to run
commands for specified nodes. But if both options are needed then there
is a small problem. My entry is:
event.* 0:0 0660 =input/ @/etc/mdev/find-touchscreen.sh
As I want event* nodes in /dev/input/ (like I had with udev) and need to
know which of them is touchscreen. With 1.13.2 busybox all I got was
"/dev/input/ @/etc/mdev/find-touchscreen.sh" node which really was
event2...
Patch below makes my rule works like I expect. Please review.
--- util-linux/mdev.c.orig 2009-01-09 14:02:43.000000000 +0100
+++ util-linux/mdev.c 2009-01-09 14:02:46.000000000 +0100
@@ -109,7 +109,7 @@
parser = config_open2("/etc/mdev.conf", fopen_for_read);
/* If we have config file, look up user settings */
- while (config_read(parser, tokens, 4, 3, "# \t", PARSE_NORMAL)) {
+ while (config_read(parser, tokens, 5, 3, "# \t", PARSE_NORMAL)) {
regmatch_t off[1 + 9*ENABLE_FEATURE_MDEV_RENAME_REGEXP];
char *val;
@@ -212,6 +212,7 @@
#endif /* ENABLE_FEATURE_MDEV_RENAME */
#if ENABLE_FEATURE_MDEV_EXEC
+ val = tokens[4];
/* The rest (opt): command to run */
if (!val)
break;
Regards,
--
JID: hrw at jabber.org
Website: http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
More information about the busybox
mailing list