chiark / gitweb /
[PATCH] added libsysfs code from sysutils-0.1.1-071803 release
[elogind.git] / udev.c
diff --git a/udev.c b/udev.c
index 5aa9b43d43134d1092c38036e526d4079baa99c7..bf170d1651d55c69c253d72144f8bb9b07d99bb8 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -30,6 +30,7 @@
 
 #include "udev.h"
 #include "udev_version.h"
+#include "namedev.h"
 
 
 static char *get_action(void)
@@ -262,6 +263,13 @@ int main(int argc, char *argv[])
                goto exit;
        }
 
+       namedev_init();
+
+       /* sleep for a second or two to give the kernel a chance to
+        * create the dev file
+        */
+       sleep(2);
+
        /* for now, the block layer is the only place where block devices are */
        subsystem = argv[1];
        if (strcmp(subsystem, "block") == 0)