Peter Palfrader said in http://bugs.debian.org/545008 that
"--help output, if explicitly requested, should go to stdout, not stderr."
which this patch fixes.
Additionally, the exit code was adjusted to success if help was
explicitly requested.
(Syntax error still outputs to stderr and has the same exit code.)
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
When load the tcp_diag module, and use "ss -f inet" command to show the socket
information of inet domain. But this command also shows the information of inet6
domain, but not only inet domain. and "ss -f inet6", "ss -4", "ss -6" have the
same problem.
Signed-off-by: Li Yewang <lyw@cn.fujitsu.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
when using the "ss -f inet -t" command to show the tcp socket information of
inet domain, we get the error message: "ss: no socket tables to show with such filter."
This patch can fix this bug.
Signed-off-by: Li Yewang <lyw@cn.fujitsu.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
The function get_hz() returns the psched hz value which is wrong
for anything other than tc usage. Should be user hz instead, but
kernel is broken (patch sent) and this code doesn't get hit on
current systems (netlink is used first).
In ss.c, generic_proc_open(), for which the net_*_open functions are just
convenient wrappers, uses fopen, so errors are signalled by a NULL return
value. Some checks were expecting negative values instead, fix them.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Output from /proc may include partial records, so rather than
trying to be sexy and do own parsing, just use stdio.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>