diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-11-13 12:36:47 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:27:34 -0700 |
commit | d402af7d71be3b89eac5877a425f2c6bce5c4f3d (patch) | |
tree | 6a58878421d250fd1c2d45409f35b20d57320a36 /wait_for_sysfs.c | |
parent | 2092fbcdebf5313f29b43bdaa57a22baf0c0269f (diff) |
[PATCH] don't wait for sysfs if the kernel(2.6.10-rc2) tells us what not to expect
Newer kernels will tell us if we should wait for the "device" or
the "bus" link. So don't waste the time with our lists or wait
for the timeout.
Diffstat (limited to 'wait_for_sysfs.c')
-rw-r--r-- | wait_for_sysfs.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/wait_for_sysfs.c b/wait_for_sysfs.c index 42b9d383dc..84a25adb97 100644 --- a/wait_for_sysfs.c +++ b/wait_for_sysfs.c @@ -32,10 +32,11 @@ #include <errno.h> #include <sys/stat.h> -#include "logging.h" +#include "libsysfs/sysfs/libsysfs.h" +#include "udev_lib.h" #include "udev_version.h" #include "udev_sysfs.h" -#include "libsysfs/sysfs/libsysfs.h" +#include "logging.h" #ifdef LOG unsigned char logname[LOGNAME_SIZE]; @@ -106,7 +107,7 @@ int main(int argc, char *argv[], char *envp[]) } /* open the class device we are called for */ - class_dev = open_class_device_wait(filename); + class_dev = wait_class_device_open(filename); if (!class_dev) { dbg("error: class device unavailable (probably remove has beaten us)"); goto exit; @@ -132,15 +133,15 @@ int main(int argc, char *argv[], char *envp[]) filename[SYSFS_PATH_MAX-1] = '\0'; /* open the path we are called for */ - devices_dev = open_devices_device_wait(filename); + devices_dev = wait_devices_device_open(filename); if (!devices_dev) { dbg("error: devices device unavailable (probably remove has beaten us)"); goto exit; } dbg("devices device opened '%s'", filename); - /* wait for the bus value */ - wait_for_bus_device(devices_dev, &error); + /* wait for the devices device */ + wait_for_devices_device(devices_dev, &error); sysfs_close_device(devices_dev); |