diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-22 09:47:27 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-22 10:27:39 +0200 |
commit | 955731f6ce15763db1a0139c64f3854753e5dd05 (patch) | |
tree | 7fc36273a2406d51d00a8ffd6203b0e35149ee97 | |
parent | fb806cd3ce7611035b6f9dfa40c98359c320d6f2 (diff) | |
download | nlplug-955731f6ce15763db1a0139c64f3854753e5dd05.tar.bz2 nlplug-955731f6ce15763db1a0139c64f3854753e5dd05.tar.xz |
nlplug: do not require a handler program
devtmpfs will create the device node. in initramfs situation we may not
bother about permissions etc.
-rw-r--r-- | nlplug.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -219,8 +219,10 @@ int dispatch_uevent(struct uevent *ev, struct ueventconf *conf) conf->modalias_count++; } else if (ev->devname != NULL) { - run_child(conf->program_argv); - conf->fork_count++; + if (conf->program_argv[0] != NULL) { + run_child(conf->program_argv); + conf->fork_count++; + } if (ev->subsystem && strcmp(ev->subsystem, "block") == 0 && strcmp(ev->action, "add") == 0 @@ -328,9 +330,6 @@ int main(int argc, char *argv[]) usage(); } ARGEND; - if (argv[0] == NULL) - usage(); - conf.program_argv = argv; chdir("/dev"); |