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:
Jean Delvare committed 2004-02-29 10:25:54 +00:00
1 parent d0091d0dfd
commit 8ee9459465
1 file changed
+9 -2
+9 -2
View File
@@ -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];