get rid of macros2
This commit is contained in:
@@ -17,7 +17,7 @@ void detectHwmon(gpuSensors* target, const std::string& pci) {
|
||||
target->hwmon = utils::getFirstDir("/sys/bus/pci/devices/" + pci + "/hwmon");
|
||||
applog(LOG::INF, "Detected path \"{}\"", target->hwmon);
|
||||
|
||||
if(utils::fileExists(target->hwmon + REL_METRICS_PATH)) {
|
||||
if(utils::fileExists(target->hwmon + rel_metrics_path)) {
|
||||
applog(LOG::INF, "found gpu_metrics");
|
||||
target->hasGpuMetrics = true;
|
||||
}
|
||||
@@ -47,8 +47,8 @@ void updateFromFs(gpuSensors* g) {
|
||||
|
||||
/* get sensors for vega and newer (rx5700xt, rx7800xt [*]) */
|
||||
void updateFromMetrics(gpuSensors* g) {
|
||||
char raw_metrics[MAX_METRICS_LENGTH];
|
||||
if (!utils::readFile(g->hwmon + REL_METRICS_PATH, raw_metrics, sizeof(raw_metrics))) return;
|
||||
char raw_metrics[max_metrics_length];
|
||||
if (!utils::readFile(g->hwmon + rel_metrics_path, raw_metrics, sizeof(raw_metrics))) return;
|
||||
|
||||
auto header = reinterpret_cast<metrics::metrics_table_header*>(raw_metrics);
|
||||
switch (header->format_revision * 10 + header->content_revision) {
|
||||
|
||||
Reference in New Issue
Block a user