chiark / gitweb /
[PATCH] udevd race conditions and performance, assorted cleanups
[elogind.git] / udevstart.c
index 21fd93df742b12776664bb10a4ebae1f5c23c11c..eda6355b534e68e6b8cbc4502579255afbe9ab53 100644 (file)
@@ -29,6 +29,8 @@
 #include <ctype.h>
 #include <dirent.h>
 #include <sys/wait.h>
+#include <sys/types.h>
+#include <unistd.h>
 
 #include "logging.h"
 
@@ -78,12 +80,11 @@ static void udev_exec(const char *path, const char* subsystem)
        }
 }
 
-static int udev_scan(void)
+static void udev_scan(void)
 {
        char *devpath;
        DIR *dir;
        struct dirent *dent;
-       int retval = -EINVAL;
 
        devpath = "block";
        dir = opendir(SYSBLOCK);
@@ -179,11 +180,6 @@ static int udev_scan(void)
                        }
                }
        }
-
-       if (retval > 0)
-               retval = 0;
-
-       return -retval;
 }
 
 
@@ -191,5 +187,7 @@ int main(int argc, char *argv[], char *envp[])
 {
        init_logging("udevstart");
 
-       return udev_scan();
+       udev_scan();
+
+       return 0;
 }