diff options
author | PA4WDH | 2023-05-24 10:22:28 +0200 |
---|---|---|
committer | PA4WDH | 2023-05-24 10:22:28 +0200 |
commit | 38c1ad30b2ad8d71f946045e803fd8c4aa5f2e29 (patch) | |
tree | 97556352b05defdddf48cb9787840c13e0ff4295 /cputemp2maxfreq.c | |
parent | Add data log option (diff) | |
download | cputemp2maxfreq-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.c | 3 |
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:"); |