aboutsummaryrefslogtreecommitdiffstats
path: root/cputemp2maxfreq.c
diff options
context:
space:
mode:
authorPA4WDH2024-08-24 12:43:34 +0200
committerPA4WDH2024-08-24 12:43:34 +0200
commita13b6a07822e9807af50bd67bfe64ccba03b5b00 (patch)
tree125b82a0e3cf114fce7522ccd1ef1ebdc936d5c3 /cputemp2maxfreq.c
parentAdd ebuild for version 0.5 (diff)
downloadcputemp2maxfreq-a13b6a07822e9807af50bd67bfe64ccba03b5b00.tar.gz
cputemp2maxfreq-a13b6a07822e9807af50bd67bfe64ccba03b5b00.tar.bz2
cputemp2maxfreq-a13b6a07822e9807af50bd67bfe64ccba03b5b00.zip
Add -k option to keep state on successul exit
Diffstat (limited to 'cputemp2maxfreq.c')
-rw-r--r--cputemp2maxfreq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c
index 242969d..6921279 100644
--- a/cputemp2maxfreq.c
+++ b/cputemp2maxfreq.c
@@ -31,6 +31,7 @@ struct s_config config={
NULL, // File handler for CSV file
0, // Don't use unix timestamps in log outputs
-1, // Transition latency, default to autodetect
+ 0, // Do not keep state on exit (Set CPU to lowest frequency)
};
struct s_cpudata cpudata;
@@ -88,6 +89,12 @@ int main(int argc,char **argv)
} else {
config.logger("Transition latency: %d",config.transition_latency);
}
+ if (config.keepstate==1)
+ {
+ config.logger("State on exit: Keep last state on normal exit");
+ } else {
+ config.logger("State on exit: Always set CPU to lowest frequency");
+ }
if ((config.max_temp<VALID_TEMP_MIN) || (config.max_temp>VALID_TEMP_MAX))
{