]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From George Bakos: send the "reading from" messages to stderr, not
authorguy <guy>
Thu, 18 Dec 2003 01:22:57 +0000 (01:22 +0000)
committerguy <guy>
Thu, 18 Dec 2003 01:22:57 +0000 (01:22 +0000)
stdout, so only output for packets goes to stdout.

tcpdump.c

index 0969b7b938678654194225beeca956558fdc46af..6a87ecc3677cd74293ccb0e952ed415e43a188bc 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] _U_ =
     "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.216.2.4 2003-11-18 23:12:11 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.216.2.5 2003-12-18 01:22:57 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -636,10 +636,11 @@ main(int argc, char **argv)
                dlt = pcap_datalink(pd);
                dlt_name = pcap_datalink_val_to_name(dlt);
                if (dlt_name == NULL) {
-                       printf("reading from file %s, link-type %u\n",
+                       fprintf(stderr, "reading from file %s, link-type %u\n",
                            RFileName, dlt);
                } else {
-                       printf("reading from file %s, link-type %s (%s)\n",
+                       fprintf(stderr,
+                           "reading from file %s, link-type %s (%s)\n",
                            RFileName, dlt_name,
                            pcap_datalink_val_to_description(dlt));
                }