aboutsummaryrefslogtreecommitdiffstats
path: root/failsafe.c
diff options
context:
space:
mode:
authorPA4WDH2023-05-24 09:09:23 +0200
committerPA4WDH2023-05-24 09:09:23 +0200
commit33bd1b7c488e935f247407e191811a7539a12375 (patch)
treef60c23d07933afbfc36363b742945b62c93732cf /failsafe.c
parentAdd logging functions (diff)
downloadcputemp2maxfreq-33bd1b7c488e935f247407e191811a7539a12375.tar.gz
cputemp2maxfreq-33bd1b7c488e935f247407e191811a7539a12375.tar.bz2
cputemp2maxfreq-33bd1b7c488e935f247407e191811a7539a12375.zip
Redirect all output to logging functions
Diffstat (limited to 'failsafe.c')
-rw-r--r--failsafe.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/failsafe.c b/failsafe.c
index fec00e8..f0c0b3e 100644
--- a/failsafe.c
+++ b/failsafe.c
@@ -13,20 +13,20 @@ void failsafe(int code)
// First try to set the CPU to it's minimum frequency
if (cpufreq_set_long_int("scaling_max_freq",cpudata.min_freq,100)>0)
{
- printf("Set scaling frequency to CPU's minimum frequency.\n");
+ config.logger("Set scaling frequency to CPU's minimum frequency");
exit(code);
}
- printf("Failed to set scaling frequency to CPU's minimum frequency, error: %d (%s).\n",errno,strerror(errno));
+ config.logger("Failed to set scaling frequency to CPU's minimum frequency, error: %d (%s)",errno,strerror(errno));
// If that failed, try the fallback frequency
if (cpufreq_set_long_int("scaling_max_freq",config.fallback_freq,100)>0)
{
- printf("Set scaling frequency to fallback frequency.\n");
+ config.logger("Set scaling frequency to fallback frequency");
exit(code);
}
- printf("Failed to set scaling frequency to fallback frequency, error: %d (%s).\n",errno,strerror(errno));
+ config.logger("Failed to set scaling frequency to fallback frequency, error: %d (%s)",errno,strerror(errno));
// Everything failed, issue a warning
- printf("All safety measures failed, watch out not to fry your hardware.\n");
+ config.logger("All safety measures failed, watch out not to fry your hardware");
exit(code);
}