2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +00:00

sensors-detect: Give udev time to settle before accessing i2c device

nodes.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5822 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2010-02-04 08:14:10 +00:00
parent 49efe1f4bf
commit d64aa20664
2 changed files with 9 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
lm-sensors CHANGES file
-----------------------
SVN HEAD
sensors-detect: Give udev time to settle before accessing i2c nodes
3.1.2 (2010-02-02)
libsensors: Support upcoming sysfs path to i2c adapters
Add support for HID devices

View File

@@ -5892,6 +5892,12 @@ sub main
$by_default = 1 if dmi_match('board_vendor', 'asustek', 'tyan',
'supermicro');
# udev may take some time to create the device node
if (!(-x "/sbin/udevadm" && system("/sbin/udevadm settle") == 0)
&& !(-x "/sbin/udevsettle" && system("/sbin/udevsettle") == 0)) {
sleep(1);
}
for (my $dev_nr = 0; $dev_nr < @i2c_adapters; $dev_nr++) {
next unless exists $i2c_adapters[$dev_nr];
scan_i2c_adapter($dev_nr, $by_default);