mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-29 12:50:43 +00:00
Correctly handle 2.6 subclients. Original patch by Andrey
Borzenkov, much reworked. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2327 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d0091d0dfd
commit
8ee9459465
1 file changed
+9
-2
+9
-2
@@ -125,9 +125,16 @@ int sensors_read_proc_chips(void)
|
||||
strcat(n, "/name");
|
||||
|
||||
if ((f = fopen(n, "r")) != NULL) {
|
||||
char x[120];
|
||||
fscanf(f, "%[a-zA-z0-9_]", x);
|
||||
char x[81];
|
||||
int len = 0;
|
||||
if (!fscanf(f, "%80[a-zA-z0-9_ ]%n", x, &len)) {
|
||||
fclose(f);
|
||||
continue;
|
||||
}
|
||||
fclose(f);
|
||||
if (len >= 10 && !strcmp(x+len-10, " subclient"))
|
||||
continue;
|
||||
|
||||
/* HACK */ strcat(x, "-*");
|
||||
if ((res = sensors_parse_chip_name(x, &entry.name))) {
|
||||
char em[NAME_MAX + 20];
|
||||
|
||||
Reference in new issue
Block a user