]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Merge branch 'print_linkinfo_brief' into next
authorDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 16:14:49 +0000 (08:14 -0800)
committerDavid Ahern <dsahern@gmail.com>
Fri, 16 Feb 2018 16:14:49 +0000 (08:14 -0800)
Serhey Popovych  says:

====================

With this series I propose to make print_linkinfo_brief() static in
favor of print_linkinfo() as single point for linkinfo printing.

Changes presented with this series tested using following script:

\#!/bin/bash

iproute2_dir="$1"
iface='eth0.2'

pushd "$iproute2_dir" &>/dev/null

for i in new old; do
DIR="/tmp/$i"
mkdir -p "$DIR"

ln -snf ip.$i ip/ip

# normal
ip/ip link show                  >"$DIR/ip-link-show"
ip/ip -4 addr show               >"$DIR/ip-4-addr-show"
ip/ip -6 addr show               >"$DIR/ip-6-addr-show"
ip/ip addr show dev "$iface"     >"$DIR/ip-addr-show-$iface"

# brief
ip/ip -br link show              >"$DIR/ip-br-link-show"
ip/ip -br -4 addr show           >"$DIR/ip-br-4-addr-show"
ip/ip -br -6 addr show           >"$DIR/ip-br-6-addr-show"
ip/ip -br addr show dev "$iface" >"$DIR/ip-br-addr-show-$iface"
done
rm -f ip/ip

diff -urN /tmp/{old,new} |sed -n -Ee'/^(-{3}|\+{3})[[:space:]]+/!p'
rc=$?

popd &>/dev/null
exit $rc

Expected results : <no output>
Actual results   : <no output>

Although test coverage is far from ideal in my opinion it covers most
important aspects of the changes presented by the series.

All this work is done in prepare of iplink_get() enhancements to support
attribute parse that finally will be used to simplify ip/tunnel
RTM_GETLINK code.

====================

Signed-off-by: David Ahern <dsahern@gmail.com>

Trivial merge