]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't print the "verbose output suppressed" message if "-w" was
authorguy <guy>
Wed, 8 Jan 2003 04:33:27 +0000 (04:33 +0000)
committerguy <guy>
Wed, 8 Jan 2003 04:33:27 +0000 (04:33 +0000)
specified, as, in that case, there's no output to make more verbose.

tcpdump.c

index c714444bba4993c5a0968d9daa2ff5e41d39dad8..5fa88e80de875538634fadbb086092ca5e058a0d 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] =
     "@(#) 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[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.198 2003-01-07 09:56:00 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.199 2003-01-08 04:33:27 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -727,12 +727,15 @@ main(int argc, char **argv)
 #endif
 #ifndef WIN32
        if (RFileName == NULL) {
-            if (vflag == 0)
-                (void)fprintf(stderr, "%s: verbose output suppressed, use -v or -vv for full protocol decode\n",program_name);
-            else
-                (void)fprintf(stderr, "%s: ",program_name);
-            (void)fprintf(stderr, "listening on %s, capture size %u bytes\n", device, snaplen);
-            (void)fflush(stderr);
+               if (!vflag && !WFileName) {
+                       (void)fprintf(stderr,
+                           "%s: verbose output suppressed, use -v or -vv for full protocol decode\n",
+                           program_name);
+               } else
+                       (void)fprintf(stderr, "%s: ", program_name);
+               (void)fprintf(stderr, "listening on %s, capture size %u bytes\n",
+                   device, snaplen);
+               (void)fflush(stderr);
        }
 #endif /* WIN32 */
        if (pcap_loop(pd, cnt, callback, pcap_userdata) < 0) {