X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev_config.c;h=1d05a3fb13cfb55a11b23e51968ccb6384955133;hp=34ef82b8812c24220819c9ff9f85ab923fa0fa22;hb=e59d338c9685985fa9aed890cbb8bf3bb17160ee;hpb=51a8bb2f361d86013e7579570faba446eed9c66d diff --git a/udev_config.c b/udev_config.c index 34ef82b88..1d05a3fb1 100644 --- a/udev_config.c +++ b/udev_config.c @@ -31,12 +31,12 @@ #include #include #include +#include #include "udev.h" #include "udev_version.h" #include "logging.h" #include "namedev.h" -#include "libsysfs/libsysfs.h" /* global variables */ char sysfs_path[SYSFS_PATH_MAX]; @@ -49,6 +49,7 @@ char default_mode_str[MODE_SIZE]; char default_owner_str[OWNER_SIZE]; char default_group_str[GROUP_SIZE]; int udev_log; +int udev_sleep; static int string_is_true(char *str) @@ -71,6 +72,10 @@ static void init_variables(void) strfieldcpy(udev_rules_filename, UDEV_RULES_FILE); strfieldcpy(udev_permissions_filename, UDEV_PERMISSION_FILE); udev_log = string_is_true(UDEV_LOG_DEFAULT); + + udev_sleep = 1; + if (getenv("UDEV_NO_SLEEP") != NULL) + udev_sleep = 0; } #define set_var(_name, _var) \