X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=namedev.c;h=89513934ff4e483a49d60f621c973ddfd77d49f0;hb=1d24d9977d46e20779e7d9d05f4b6aa6dcad28cc;hp=186a9f5cc25fdec1afa5bb4d51d71c495300d55d;hpb=88f09368b3dc2d17cf2ce1a4841e42a120a4dbb9;p=elogind.git diff --git a/namedev.c b/namedev.c index 186a9f5cc..89513934f 100644 --- a/namedev.c +++ b/namedev.c @@ -32,13 +32,13 @@ #include #include #include +#include #include "list.h" #include "udev.h" #include "udev_version.h" #include "logging.h" #include "namedev.h" -#include "libsysfs/libsysfs.h" #include "klibc_fixups.h" static struct sysfs_attribute *find_sysfs_attribute(struct sysfs_class_device *class_dev, struct sysfs_device *sysfs_device, char *attr); @@ -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')