summaryrefslogtreecommitdiff
path: root/lib/init.c
diff options
context:
space:
mode:
authormmh <mmh@7894878c-1315-0410-8ee3-d5d059ff63e0>2005-09-18 20:38:19 +0000
committermmh <mmh@7894878c-1315-0410-8ee3-d5d059ff63e0>2005-09-18 20:38:19 +0000
commite43d5974d67673500a9ce059a4cf03625689be13 (patch)
treed7a37a41ba6bcded7ff46b06396f01a8ed2b94d6 /lib/init.c
parent761b29526d9c2f34c4d6e00f7d9d11f70b750140 (diff)
downloadlm-sensors-e43d5974d67673500a9ce059a4cf03625689be13.tar.gz
(mmh)
This patch replaces the I2C chip enumeration (through sysfs) in lib/proc.c with new functions in lib/sysfs (using libsysfs). The patch also updates the init code accordingly. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3095 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'lib/init.c')
-rw-r--r--lib/init.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/init.c b/lib/init.c
index 170dbde3..156d83f8 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -41,13 +41,11 @@ int sensors_init(FILE *input)
{
int res;
sensors_cleanup();
- if ((res = sensors_read_proc_chips()))
- return res;
if (sensors_init_sysfs()) {
- if ((res = sensors_read_sysfs_bus()))
+ if ((res = sensors_read_sysfs_chips()) || (res = sensors_read_sysfs_bus()))
return res;
} else {
- if ((res = sensors_read_proc_bus()))
+ if ((res = sensors_read_proc_chips()) || (res = sensors_read_proc_bus()))
return res;
}
sensors_yyin = input;