From 30a5aba1d3773df5c3b392d36da1f5b9e0290973 Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 3 Jul 2025 12:47:58 +0200 Subject: [PATCH] its not getting the revision, its getting the whole header, refactor --- include/gpu.hpp | 2 +- src/gpu.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/gpu.hpp b/include/gpu.hpp index cbc8cf3..08d7a2c 100644 --- a/include/gpu.hpp +++ b/include/gpu.hpp @@ -29,4 +29,4 @@ struct GpuMetricsHeader_t { }; gpu_t getGpu(GpuMetricsHeader_t header, std::string hw); -GpuMetricsHeader_t getGpuMetricsRev(std::string path); \ No newline at end of file +GpuMetricsHeader_t getGpuMetricsHeader(std::string path); \ No newline at end of file diff --git a/src/gpu.cpp b/src/gpu.cpp index 14293f0..48c68e6 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -84,7 +84,7 @@ struct GpuMetrics_v1_3_t { uint8_t padding1; }; -GpuMetricsHeader_t getGpuMetricsRev(std::string path) { +GpuMetricsHeader_t getGpuMetricsHeader(std::string path) { GpuMetricsHeader_t header; std::ifstream f(path, std::ios::binary); if (f.good()) { @@ -93,7 +93,7 @@ GpuMetricsHeader_t getGpuMetricsRev(std::string path) { std::cout << ", size " << std::to_string(header.structure_size) << std::endl; f.close(); } else { - std::cerr << "[GpuMetrics] error reading header at path " + path << std::endl; + std::cerr << "[GpuMetrics] error reading header at path " + path + " (wrong card # ?)" << std::endl; } return header;