only one --capture-comment option may be given to dumpcap

svn path=/trunk/; revision=50946
This commit is contained in:
Martin Kaiser 2013-07-27 16:28:03 +00:00
parent 82ea635aa6
commit 8905991b67
1 changed files with 4 additions and 0 deletions

View File

@ -628,6 +628,10 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_
switch(opt) {
case LONGOPT_NUM_CAP_COMMENT: /* capture comment */
if (capture_opts->capture_comment) {
cmdarg_err("--capture-comment can be set only once per file");
return 1;
}
capture_opts->capture_comment = g_strdup(optarg_str_p);
break;
case 'a': /* autostop criteria */