summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-02-17 20:59:26 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:28 -0700
commit961e47847cdb33b1fabe4084cef7cd37f73a19d1 (patch)
treea78f59f91001d2db450c0ffcb31be9e012eccf31 /namedev.c
parent8fff7b42b45ef13946f7bc25308016d3dfdc63df (diff)
[PATCH] add support for UDEV_NO_SLEEP env variable so Gentoo people will be happy.
Actually, I'm happy to, startup time is much smaller...
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/namedev.c b/namedev.c
index 186a9f5cc2..90c85d41e4 100644
--- a/namedev.c
+++ b/namedev.c
@@ -623,7 +623,8 @@ static struct sysfs_device *get_sysfs_device(struct sysfs_class_device *class_de
tspec.tv_nsec = 10000000; /* sleep 10 millisec */
loop = 10;
while (loop--) {
- nanosleep(&tspec, NULL);
+ if (udev_sleep)
+ nanosleep(&tspec, NULL);
if (class_dev_parent)
sysfs_device = sysfs_get_classdev_device(class_dev_parent);
else
@@ -650,7 +651,8 @@ device_found:
loop = 10;
tspec.tv_nsec = 10000000;
while (loop--) {
- nanosleep(&tspec, NULL);
+ if (udev_sleep)
+ nanosleep(&tspec, NULL);
sysfs_get_device_bus(sysfs_device);
if (sysfs_device->bus[0] != '\0')