Re: [PATCH iproute2-next v2 1/6] ipaddress: Improve print_linkinfo()

2018-02-01 Thread Serhey Popovych
David Ahern wrote: > On 1/30/18 11:09 AM, Serhey Popovych wrote: > >> diff --git a/ip/ipaddress.c b/ip/ipaddress.c >> index 051a05f..f8fd392 100644 >> --- a/ip/ipaddress.c >> +++ b/ip/ipaddress.c >> @@ -948,14 +948,14 @@ int print_linkinfo_brief(const struct sockaddr_nl *who, >>

Re: [PATCH iproute2-next v2 1/6] ipaddress: Improve print_linkinfo()

2018-01-31 Thread David Ahern
On 1/30/18 11:09 AM, Serhey Popovych wrote: > diff --git a/ip/ipaddress.c b/ip/ipaddress.c > index 051a05f..f8fd392 100644 > --- a/ip/ipaddress.c > +++ b/ip/ipaddress.c > @@ -948,14 +948,14 @@ int print_linkinfo_brief(const struct sockaddr_nl *who, > parse_rtattr(tb, IFLA_MAX,

[PATCH iproute2-next v2 1/6] ipaddress: Improve print_linkinfo()

2018-01-30 Thread Serhey Popovych
There are few places to improve: 1) return -1 when entry is filtered instead of zero, which means accept entry: ipaddress_list_flush_or_save() the only user of this 2) use ll_index_to_name() as last resort to translate name to index: it will return name in the form "if%d" in case