aboutsummaryrefslogtreecommitdiffstats
path: root/cputemp2maxfreq.c
diff options
context:
space:
mode:
authorPA4WDH2023-05-24 10:22:28 +0200
committerPA4WDH2023-05-24 10:22:28 +0200
commit38c1ad30b2ad8d71f946045e803fd8c4aa5f2e29 (patch)
tree97556352b05defdddf48cb9787840c13e0ff4295 /cputemp2maxfreq.c
parentAdd data log option (diff)
downloadcputemp2maxfreq-38c1ad30b2ad8d71f946045e803fd8c4aa5f2e29.tar.gz
cputemp2maxfreq-38c1ad30b2ad8d71f946045e803fd8c4aa5f2e29.tar.bz2
cputemp2maxfreq-38c1ad30b2ad8d71f946045e803fd8c4aa5f2e29.zip
Detect program name from argv[0]
Diffstat (limited to 'cputemp2maxfreq.c')
-rw-r--r--cputemp2maxfreq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c
index dd58e16..826655a 100644
--- a/cputemp2maxfreq.c
+++ b/cputemp2maxfreq.c
@@ -15,6 +15,7 @@
// Set default config
struct s_config config={
+ "", // Name of this program, set by argparse
"conservative", // Governor
70000, // Temperature
"/sys/devices/virtual/thermal/thermal_zone0/temp", // Temperature input
@@ -39,7 +40,7 @@ int main(int argc,char **argv)
long int newfreq;
argparse(argc,argv);
- config.logger("Version %s, buildtime %s %s",version(),__DATE__,__TIME__);
+ config.logger("%s version %s, buildtime %s %s",config.name,version(),__DATE__,__TIME__);
// Log configuration
config.logger("Configuration:");