aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPA4WDH2024-09-13 11:12:18 +0200
committerPA4WDH2024-09-13 11:12:18 +0200
commitf55bdce97f296256234a730483afaff1fef9a7bb (patch)
treed1b1e3a0108ebf0156c6bc6d0d938163d6ab3920
parentMove more calls from sysfs_read_long_int to cpufreq_get_long_int (diff)
downloadcputemp2maxfreq-f55bdce97f296256234a730483afaff1fef9a7bb.tar.gz
cputemp2maxfreq-f55bdce97f296256234a730483afaff1fef9a7bb.tar.bz2
cputemp2maxfreq-f55bdce97f296256234a730483afaff1fef9a7bb.zip
Improve assignment of default values
-rw-r--r--cputemp2maxfreq.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c
index 5137d16..7098ccc 100644
--- a/cputemp2maxfreq.c
+++ b/cputemp2maxfreq.c
@@ -35,34 +35,34 @@
// Set default config
struct s_config config={
- "", // Name of this program, set by argparse
- "conservative", // Governor
- 70000, // Temperature
- "auto", // Temperature input
- 100000, // Frequency step
- 2000000, // Fallback frequency
- 10, // Interval
- "stdout", // Logger name
- &logger_stdout, // Logger function
- 0, // Don't log measurement data
- "", // CSV logfile
- 0, // Don't overwrite CSV logfile
- 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)
- -1, // Physical CPU to change
+ .name="", // Name of this program, set by argparse
+ .governor="conservative", // Governor
+ .max_temp=70000, // Temperature
+ .temp_input="auto", // Temperature input
+ .freq_step=100000, // Frequency step
+ .fallback_freq=2000000, // Fallback frequency
+ .interval=10, // Interval
+ .logger_name="stdout", // Logger name
+ .logger=&logger_stdout, // Logger function
+ .log_data=0, // Don't log measurement data
+ .csvlog="", // CSV logfile
+ .csvoverwrite=0, // Don't overwrite CSV logfile
+ .csvfile=NULL, // File handler for CSV file
+ .use_unixtime=0, // Don't use unix timestamps in log outputs
+ .transition_latency=-1, // Transition latency, default to autodetect
+ .keepstate=0, // Do not keep state on exit (Set lowest frequency)
+ .cpu=-1, // Physical CPU to change
};
struct s_cpudata cpudata={
- 0, // CPU's minimum frequency
- 0, // CPU's maximum frequency
- 0, // CPU's current frequency
- 0, // CPU's current temperature
- 0, // Governor's maximum scaling frequency
- 0, // CPU's transition latency
- NULL, // Pointer to the cpulist, set by cpulist_find_cpus
- 0, // Number of CPU's in cpulist, set by cpulist_find_cpus
+ .min_freq=0, // CPU's minimum frequency
+ .max_freq=0, // CPU's maximum frequency
+ .cur_freq=0, // CPU's current frequency
+ .cur_temp=0, // CPU's current temperature
+ .scale_max=0, // Governor's maximum scaling frequency
+ .transition_latency=0, // CPU's transition latency
+ .cpulist=NULL, // Pointer to the cpulist, set by cpulist_find_cpus
+ .cpulist_len=0, // Number of CPU's in cpulist, set by cpulist_find_cpus
};
void signal_handler(int signum)