From a13b6a07822e9807af50bd67bfe64ccba03b5b00 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Sat, 24 Aug 2024 12:43:34 +0200 Subject: Add -k option to keep state on successul exit --- cputemp2maxfreq.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cputemp2maxfreq.c') 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_tempVALID_TEMP_MAX)) { -- cgit v1.2.3