summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-04-20 14:31:37 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-04-20 14:31:37 (GMT)
commitc8bc6703879da5a96dbc1319a07fa307cf1892f1 (patch)
tree0609dcb236987385401664ffc3a3b5082c042f02 /src/options.c
parent011afcdbf0614cc61dd4022448122fe40cfa39ff (diff)
added option for post processing
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 0ad0844..90ea6f3 100644
--- a/src/options.c
+++ b/src/options.c
@@ -202,6 +202,7 @@ int options_parse(options_t* opt, int argc, char* argv[])
PARSE_INT_PARAM("-m","--mode", opt->mode_, 8)
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_)
else
return i;
}
@@ -248,6 +249,7 @@ void options_default(options_t* opt)
opt->mode_ = 0644;
opt->interval_ = 50;
opt->offset_ = 0;
+ opt->post_process_ = NULL;
}
void options_clear(options_t* opt)
@@ -272,6 +274,8 @@ void options_clear(options_t* opt)
free(opt->output_dir_);
if(opt->name_format_)
free(opt->name_format_);
+ if(opt->post_process_)
+ free(opt->post_process_);
}
void options_print_usage()
@@ -294,6 +298,7 @@ void options_print_usage()
printf(" [-m|--mode] <value> ocatl represantion of the file permission mode\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");
}
void options_print_version()
@@ -322,4 +327,5 @@ void options_print(options_t* opt)
printf("mode: %04o\n", (int)opt->mode_);
printf("interval: %d\n", opt->interval_);
printf("offset: %d\n", opt->offset_);
+ printf("post_process: '%s'\n", opt->post_process_);
}