diff options
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c index f8a42d8..71015f8 100644 --- a/src/options.c +++ b/src/options.c @@ -197,6 +197,7 @@ int options_parse(options_t* opt, int argc, char* argv[]) PARSE_STRING_PARAM("-d","--output-dir", opt->output_dir_) PARSE_STRING_PARAM("-f","--name-format", opt->name_format_) PARSE_INT_PARAM("-m","--mode", opt->mode_, 8) + PARSE_BOOL_PARAM("-n", "--nocache", opt->nocache_) PARSE_INT_PARAM("-i","--interval", opt->interval_, 10) PARSE_INT_PARAM("-o","--offset", opt->offset_, 10) PARSE_STRING_PARAM("-x","--post-process", opt->post_process_) @@ -244,6 +245,7 @@ void options_default(options_t* opt) opt->output_dir_ = strdup("/srv/archiv"); opt->name_format_ = strdup("%Y-%m-%d-%H00.ogg"); opt->mode_ = 0644; + opt->nocache_ = 0; opt->interval_ = 50; opt->offset_ = 0; opt->post_process_ = NULL; @@ -293,6 +295,7 @@ void options_print_usage() printf(" [-d|--output-dir] <path> path to the output directory\n"); printf(" [-f|--name-format] <format> the file name format, see manpage of strftime for the syntax\n"); printf(" [-m|--mode] <value> octal representation of the file permission mode\n"); + printf(" [-n|--nocache] Use O_DIRECT for recorded files\n"); printf(" [-i|--interval] <value> interval for time checks in ms\n"); printf(" [-o|--offset] <value> time offset for recordings in ms\n"); printf(" [-x|--post-process] <script> call script when file is finished\n"); @@ -322,6 +325,7 @@ void options_print(options_t* opt) printf("output_dir: '%s'\n", opt->output_dir_); printf("name_format: '%s'\n", opt->name_format_); printf("mode: %04o\n", (int)opt->mode_); + printf("nocache: %s\n", !opt->nocache_ ? "false" : "true"); printf("interval: %d\n", opt->interval_); printf("offset: %d\n", opt->offset_); printf("post_process: '%s'\n", opt->post_process_); |