aboutsummaryrefslogtreecommitdiffstats
path: root/argparse.c
diff options
context:
space:
mode:
Diffstat (limited to 'argparse.c')
-rw-r--r--argparse.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/argparse.c b/argparse.c
index 43ee2ec..888f445 100644
--- a/argparse.c
+++ b/argparse.c
@@ -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;