diff options
author | PA4WDH | 2023-05-24 12:57:25 +0200 |
---|---|---|
committer | PA4WDH | 2023-05-24 12:57:25 +0200 |
commit | 16fb812a46d0e8cde432b58f7dbf6fce147eb89f (patch) | |
tree | 9e019f98e515cb21e6c38ff487a82fe375675991 /failsafe.c | |
parent | Detect program name from argv[0] (diff) | |
download | cputemp2maxfreq-16fb812a46d0e8cde432b58f7dbf6fce147eb89f.tar.gz cputemp2maxfreq-16fb812a46d0e8cde432b58f7dbf6fce147eb89f.tar.bz2 cputemp2maxfreq-16fb812a46d0e8cde432b58f7dbf6fce147eb89f.zip |
Add CSV logging
Diffstat (limited to 'failsafe.c')
-rw-r--r-- | failsafe.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4,12 +4,16 @@ #include <stdio.h> #include "cputemp2maxfreq.h" #include "cpufreq.h" +#include "logger.h" extern struct s_cpudata cpudata; extern struct s_config config; void failsafe(int code) { +// Close CSV log if used + if (config.csvfile!=NULL) csvlog_close(); + // First try to set the CPU to it's minimum frequency if (cpufreq_set_long_int("scaling_max_freq",cpudata.min_freq,100)>0) { |