aboutsummaryrefslogtreecommitdiffstats
path: root/tfshark.c
diff options
context:
space:
mode:
Diffstat (limited to 'tfshark.c')
-rw-r--r--tfshark.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tfshark.c b/tfshark.c
index bad0ab3..b91afb6 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -689,13 +689,18 @@ main(int argc, char *argv[])
line_buffered = TRUE;
break;
case 'o': /* Override preference from command line */
- switch (prefs_set_pref(optarg)) {
+ {
+ char *errmsg = NULL;
+
+ switch (prefs_set_pref(optarg, &errmsg)) {
case PREFS_SET_OK:
break;
case PREFS_SET_SYNTAX_ERR:
- cmdarg_err("Invalid -o flag \"%s\"", optarg);
+ cmdarg_err("Invalid -o flag \"%s\"%s%s", optarg,
+ errmsg ? ": " : "", errmsg ? errmsg : "");
+ g_free(errmsg);
return 1;
break;
@@ -707,6 +712,7 @@ main(int argc, char *argv[])
break;
}
break;
+ }
case 'q': /* Quiet */
quiet = TRUE;
break;