mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v0.94][x86] Consider missing frequency file in x86_64 as a bug if no hypervisor is present. Took this idea from issue #37. Add if hypervisor is present to debug mode to prevent more confusions in the future
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "cpu.h"
|
||||
|
||||
#define _PATH_SYS_SYSTEM "/sys/devices/system"
|
||||
#define _PATH_SYS_CPU "/cpu"
|
||||
#define _PATH_FREQUENCY "/cpufreq"
|
||||
@@ -20,7 +22,7 @@
|
||||
#define DEFAULT_FILE_SIZE 4096
|
||||
|
||||
char* read_file(char* path, int* len);
|
||||
long get_max_freq_from_file(uint32_t core);
|
||||
long get_min_freq_from_file(uint32_t core);
|
||||
long get_max_freq_from_file(uint32_t core, bool hv_present);
|
||||
long get_min_freq_from_file(uint32_t core, bool hv_present);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user