aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2012-02-05 13:05:15 +0000
committerAnders Broman <anders.broman@ericsson.com>2012-02-05 13:05:15 +0000
commit3a812083a877e010d2dcfdfa2e0fb588b09b8f9e (patch)
tree804f7a2196c73c11f8abb72d90cad528eafa6779 /tshark.c
parentf0bb993aa5d46d2eb963ba58d3467a72bbafea2f (diff)
From Michael Mann:
Went through all stderr cases within tshark trying to make tshark "quieter". I basically ended up agreeing with the submitted in terms of what should be switched to stdout from stderr. The attached patch does that. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2881 svn path=/trunk/; revision=40862
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/tshark.c b/tshark.c
index efe2936d73..296ab4a5ff 100644
--- a/tshark.c
+++ b/tshark.c
@@ -756,12 +756,16 @@ print_current_user(void) {
cur_group = get_cur_groupname();
fprintf(stderr, "Running as user \"%s\" and group \"%s\".",
cur_user, cur_group);
- g_free(cur_user);
- g_free(cur_group);
if (running_with_special_privs()) {
- fprintf(stderr, " This could be dangerous.");
+ fprintf(stderr, "Running as user \"%s\" and group \"%s\". This could be dangerous.\n",
+ cur_user, cur_group);
}
- fprintf(stderr, "\n");
+ else {
+ fprintf(stdout, "Running as user \"%s\" and group \"%s\".",
+ cur_user, cur_group);
+ }
+ g_free(cur_user);
+ g_free(cur_group);
}
}
@@ -2110,7 +2114,7 @@ capture(void)
} else {
g_string_append_printf(str, "%u interfaces", global_capture_opts.ifaces->len);
}
- fprintf(stderr, "Capturing on %s\n", str->str);
+ fprintf(stdout, "Capturing on %s\n", str->str);
g_string_free(str, TRUE);
ret = sync_pipe_start(&global_capture_opts);
@@ -2369,7 +2373,7 @@ report_counts(void)
if (!print_packet_counts) {
/* Report the count only if we aren't printing a packet count
as packets arrive. */
- fprintf(stderr, "%u packet%s captured\n", packet_count,
+ fprintf(stdout, "%u packet%s captured\n", packet_count,
plurality(packet_count, "", "s"));
}
#ifdef SIGINFO