From: Francois-Xavier Le Bail Date: Thu, 8 Jul 2021 10:26:36 +0000 (+0200) Subject: Print the supported time stamp types (-J) to stdout instead of stderr X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/25f672ea6f5f4706dd38cb26466cf74e2b7d9e8f Print the supported time stamp types (-J) to stdout instead of stderr It is not an error, thus print them to stdout. --- diff --git a/tcpdump.c b/tcpdump.c index b7b6f995..4c56faf4 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -419,15 +419,15 @@ show_tstamp_types_and_exit(pcap_t *pc, const char *device) device); exit_tcpdump(S_SUCCESS); } - fprintf(stderr, "Time stamp types for %s (use option -j to set):\n", + fprintf(stdout, "Time stamp types for %s (use option -j to set):\n", device); for (i = 0; i < n_tstamp_types; i++) { tstamp_type_name = pcap_tstamp_type_val_to_name(tstamp_types[i]); if (tstamp_type_name != NULL) { - (void) fprintf(stderr, " %s (%s)\n", tstamp_type_name, + (void) fprintf(stdout, " %s (%s)\n", tstamp_type_name, pcap_tstamp_type_val_to_description(tstamp_types[i])); } else { - (void) fprintf(stderr, " %d\n", tstamp_types[i]); + (void) fprintf(stdout, " %d\n", tstamp_types[i]); } } pcap_free_tstamp_types(tstamp_types);