Skip to content

Commit 03c6426

Browse files
committed
unirecfilter: Print warning when using -O with -f
When filters are read from file (using -f parameter), the file also contains specification of the set of fields on each output. The -O parameter is overridden/ignored in such case. This change adds a warning to notify user that the passed -O parameter has no effect.
1 parent 534e06c commit 03c6426

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

unirecfilter/unirecfilter.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ int main(int argc, char **argv)
495495
printf("Verbosity level: %i\n", verbose);
496496
}
497497

498+
if (from == 1 && output_specifier_str != NULL) {
499+
fprintf(stderr, "Warning: The -O parameter is ignored when output specification is read from a file.\n");
500+
}
501+
498502
// Count number of output interfaces
499503
n_outputs = strlen(ifc_spec.types) - 1;
500504
module_info->num_ifc_out = n_outputs;

0 commit comments

Comments
 (0)