aboutsummaryrefslogtreecommitdiffstats
path: root/failsafe.c
diff options
context:
space:
mode:
Diffstat (limited to 'failsafe.c')
-rw-r--r--failsafe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/failsafe.c b/failsafe.c
index f0c0b3e..59d9d15 100644
--- a/failsafe.c
+++ b/failsafe.c
@@ -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)
{