From: David Ahern Date: Fri, 16 Feb 2018 16:14:49 +0000 (-0800) Subject: Merge branch 'print_linkinfo_brief' into next X-Git-Tag: v4.17.0~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34894a7b96f6903a02567308885a5dd9ab4d26fa;p=thirdparty%2Fiproute2.git Merge branch 'print_linkinfo_brief' into next 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 : Actual results : 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 --- 34894a7b96f6903a02567308885a5dd9ab4d26fa