Subject: bin/5543: netatalk -s incorrectly supresses zero vales for ddp counters
To: None <gnats-bugs@gnats.netbsd.org>
From: None <abs@mono.org>
List: netbsd-bugs
Date: 06/04/1998 22:48:31
>Number:         5543
>Category:       bin
>Synopsis:       netatalk -s incorrectly supresses zero vales for ddp counters
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun  4 22:50:01 1998
>Last-Modified:
>Originator:     abs@mono.org
>Organization:
<a href="http://www.mono.org/">Monochrome</a>
>Release:        -current Thu Jun  4 22:41:20 PDT 1998
>Environment:
System: NetBSD/i386


>Description:
	'-s' shows per protocol statistics. It states that repeating the option
	will suppress counters with a value of zero. Unfortunately atalk counters
	with a value of zero are always suppressed (It works fine for inet).

>How-To-Repeat:
	Run netstat -s, wonder where all the ddp counters are.

>Fix:
	Make atalk behave as inet. Happy to commit if someone says OK :)

*** usr.bin/netstat/atalk.c	Wed Jun  3 18:20:43 1998
--- /usr/people/abs/atalk.c	Thu Jun  4 22:36:50 1998
***************
*** 286,292 ****
  	}
  }
  #define ANY(x,y,z) \
! 	((x) ? printf("\t%ld %s%s%s\n",x,y,plural(x),z) : 0)
  
  /*
   * Dump DDP statistics structure.
--- 286,292 ----
  	}
  }
  #define ANY(x,y,z) \
! 	((sflag==1 || x) ? printf("\t%ld %s%s%s\n",x,y,plural(x),z) : 0)
  
  /*
   * Dump DDP statistics structure.
>Audit-Trail:
>Unformatted: