diff options
author | PA4WDH | 2023-05-24 10:08:01 +0200 |
---|---|---|
committer | PA4WDH | 2023-05-24 10:08:01 +0200 |
commit | 39f72042fb3e9398a2f3a56bc5bc7a8ad0f92681 (patch) | |
tree | 3d4f8816c7b3b356accd09b2f40b8cd043e28aaa /argparse.c | |
parent | Redirect all output to logging functions (diff) | |
download | cputemp2maxfreq-39f72042fb3e9398a2f3a56bc5bc7a8ad0f92681.tar.gz cputemp2maxfreq-39f72042fb3e9398a2f3a56bc5bc7a8ad0f92681.tar.bz2 cputemp2maxfreq-39f72042fb3e9398a2f3a56bc5bc7a8ad0f92681.zip |
Add data log option
Diffstat (limited to 'argparse.c')
-rw-r--r-- | argparse.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -23,6 +23,7 @@ void printhelp() " Default: %s\n" "-l <logger> Logger to use, valid values: none, kmsg, stdout, syslog\n" " Default: %s\n" + "-m Log measurements (CPU temperature and frequency)\n" "-p <time> Poll interval in seconds\n" " Default: %d\n" "-s <step> Step size in Khz when increasing/decreasing CPU speed\n" @@ -45,7 +46,7 @@ void argparse(int argc, char **argv) memcpy(&userconfig,&config,sizeof(struct s_config)); // Parse options - while((opt=getopt(argc,argv,"f:g:hi:l:p:s:t:"))!=-1) + while((opt=getopt(argc,argv,"f:g:hi:l:mp:s:t:"))!=-1) { DEBUG1_ARGPARSE("Argument: %c Value: %s\n",opt,optarg); switch(opt) @@ -65,6 +66,9 @@ void argparse(int argc, char **argv) case 'l': strncpy(userconfig.logger_name,optarg,sizeof(userconfig.logger_name)); break; + case 'm': + userconfig.log_data=1; + break; case 'p': userconfig.interval=strtoll(optarg,NULL,10); break; |