diff options
Diffstat (limited to 'udevsend.c')
-rw-r--r-- | udevsend.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/udevsend.c b/udevsend.c index 0ba1b58a4b..29d5bc155e 100644 --- a/udevsend.c +++ b/udevsend.c @@ -89,27 +89,6 @@ static int start_daemon(void) return 0; } -static void run_udev(const char *subsystem) -{ - char *const argv[] = { "udev", (char *)subsystem, NULL }; - pid_t pid; - - pid = fork(); - switch (pid) { - case 0: - /* child */ - execv(UDEV_BIN, argv); - err("exec of udev child failed"); - _exit(1); - break; - case -1: - err("fork of udev child failed"); - break; - default: - waitpid(pid, NULL, 0); - } -} - int main(int argc, char *argv[], char *envp[]) { static struct udevd_msg usend_msg; @@ -132,7 +111,7 @@ int main(int argc, char *argv[], char *envp[]) sock = socket(AF_LOCAL, SOCK_DGRAM, 0); if (sock == -1) { err("error getting socket"); - goto fallback; + goto exit; } memset(&saddr, 0x00, sizeof(struct sockaddr_un)); @@ -192,7 +171,7 @@ int main(int argc, char *argv[], char *envp[]) if (errno != ECONNREFUSED) { err("error sending message (%s)", strerror(errno)); - goto fallback; + goto exit; } if (!started_daemon) { @@ -200,7 +179,7 @@ int main(int argc, char *argv[], char *envp[]) retval = start_daemon(); if (retval) { dbg("error starting daemon"); - goto fallback; + goto exit; } dbg("udevd daemon started"); started_daemon = 1; @@ -210,10 +189,6 @@ int main(int argc, char *argv[], char *envp[]) } } -fallback: - err("unable to connect to event daemon, try to call udev directly"); - run_udev(subsystem); - exit: if (sock != -1) close(sock); |