formatting shit

This commit is contained in:
2026-05-11 10:26:30 +00:00
parent 5b8708ad0c
commit c26ccba813
13 changed files with 259 additions and 219 deletions

View File

@@ -1,11 +1,11 @@
#include "cpu.h"
#include "utils.h"
#include "log.h"
#include "utils.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <unistd.h>
void cpu_detect(struct cpu_sensors_t *t, const char *pci_dev) {
t->module = unknown;
@@ -20,8 +20,8 @@ void cpu_detect(struct cpu_sensors_t *t, const char *pci_dev) {
}
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
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
applog(LOG_INF, "Detected %d cores, module enum #%d in path %s", t->num_cores, t->module, t->hwmon);
}