diff options
Diffstat (limited to 'argparse.c')
-rw-r--r-- | argparse.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -25,6 +25,9 @@ void printhelp() " A sensor name, for example \"Core 0\"\n" " The word \"auto\" autodetects a valid sensor\n" " Default: %s\n" + "-k Keep last state on successful exit, set CPU to lowest frequency\n" + " on error.\n" + " Default: Always set CPU to lowest frequency on exit\n" "-p <time> Poll interval in seconds\n" " Default: %d\n" "-s <step> Step size in Khz when increasing/decreasing CPU speed\n" @@ -70,7 +73,7 @@ void argparse(int argc, char **argv) memcpy(&userconfig,&config,sizeof(struct s_config)); // Parse options - while((opt=getopt(argc,argv,"c:C:d:f:g:hi:l:mp:s:t:u"))!=-1) + while((opt=getopt(argc,argv,"c:C:d:f:g:hi:kl:mp:s:t:u"))!=-1) { DEBUG1_ARGPARSE("Argument: %c Value: %s\n",opt,optarg); switch(opt) @@ -103,6 +106,9 @@ void argparse(int argc, char **argv) case 'i': strncpy(userconfig.temp_input,optarg,sizeof(userconfig.temp_input)); break; + case 'k': + userconfig.keepstate=1; + break; case 'l': strncpy(userconfig.logger_name,optarg,sizeof(userconfig.logger_name)); break; |