mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-27 12:30:43 +00:00
big hack for add'l dummy adaps.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1607 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
5a24ce81e4
commit
2a03ea8e15
1 file changed
+9
-2
+9
-2
@@ -153,6 +153,10 @@ DONE2:
|
||||
if (part2)
|
||||
*(part2-1) = '-';
|
||||
*(part3-1) = '-';
|
||||
} else if(part3 && part4) {
|
||||
res->bus = SENSORS_CHIP_NAME_BUS_DUMMY;
|
||||
if (! (res->busname = strdup(part3)))
|
||||
sensors_fatal_error("sensors_parse_chip_name","Allocating new busname");
|
||||
} else
|
||||
goto ERROR;
|
||||
|
||||
@@ -179,8 +183,10 @@ int sensors_parse_i2cbus_name(const char *name, int *res)
|
||||
*res = SENSORS_CHIP_NAME_BUS_ISA;
|
||||
return 0;
|
||||
}
|
||||
if (strncmp(name,"i2c-",4))
|
||||
return -1;
|
||||
if (strncmp(name,"i2c-",4)) {
|
||||
*res = SENSORS_CHIP_NAME_BUS_DUMMY;
|
||||
return 0;
|
||||
}
|
||||
name += 4;
|
||||
if ((strlen(name) > 3) || (strlen(name) == 0))
|
||||
return -SENSORS_ERR_BUS_NAME;
|
||||
@@ -239,6 +245,7 @@ int sensors_substitute_busses(void)
|
||||
chips = &sensors_config_chips[i].chips;
|
||||
for(j = 0; j < chips->fits_count; j++)
|
||||
if ((chips->fits[j].bus != SENSORS_CHIP_NAME_BUS_ISA) &&
|
||||
(chips->fits[j].bus != SENSORS_CHIP_NAME_BUS_DUMMY) &&
|
||||
(chips->fits[j].bus != SENSORS_CHIP_NAME_BUS_ANY) &&
|
||||
(chips->fits[j].bus != SENSORS_CHIP_NAME_BUS_ANY_I2C))
|
||||
if ((err = sensors_substitute_chip(chips->fits+j, lineno)))
|
||||
|
||||
Reference in new issue
Block a user