use the simplified shit
This commit is contained in:
@@ -19,10 +19,7 @@ void cpu_detect(struct cpu_sensors_t *t, const char *pci_dev) {
|
||||
return;
|
||||
}
|
||||
|
||||
char buf[128];
|
||||
char *nt = stpncpy(buf, t->hwmon, sizeof(buf)); // nt is a pointer to the null terminator of the copied string
|
||||
stpcpy(nt, "/in1_input"); // write at the null terminator address
|
||||
t->module = file_exists(buf) ? zenpower : k10temp; // idk if this is reliable, we're trying to avoid just reading the name
|
||||
t->module = read_file(t->hwmon, "/in1_input", NULL, 0) ? zenpower : k10temp; // if we can read zenpower file then zenpower. idk if this is reliable, we're trying to avoid just reading the name
|
||||
applog(LOG_INF, "Detected %d cores, module enum #%d in path %s", t->num_cores, t->module, t->hwmon);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user