netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next] ip: don't colorize the master device
@ 2018-02-20 19:08 Stephen Hemminger
  2018-02-20 20:18 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2018-02-20 19:08 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, Stephen Hemminger

From: Stephen Hemminger <sthemmin@microsoft.com>

Putting whole string "master eth0" in the interface name color
is wrong and confusing. Let's just turn color off for all attributes
of device.

Fixes: d92cc2d087b0 ("ipaddress: ll_map: Replace ll_idx_n2a() with ll_index_to_name()")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/ipaddress.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 1380453984d5..768e2ed27e76 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -888,11 +888,9 @@ int print_linkinfo(const struct sockaddr_nl *who,
 	if (tb[IFLA_MASTER]) {
 		int master = rta_getattr_u32(tb[IFLA_MASTER]);
 
-		print_color_string(PRINT_ANY,
-				   COLOR_IFNAME,
-				   "master",
-				   "master %s ",
-				   ll_index_to_name(master));
+		print_string(PRINT_ANY,
+			     "master", "master %s ",
+			     ll_index_to_name(master));
 	}
 
 	if (tb[IFLA_OPERSTATE])
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH iproute2-next] ip: don't colorize the master device
  2018-02-20 19:08 [PATCH iproute2-next] ip: don't colorize the master device Stephen Hemminger
@ 2018-02-20 20:18 ` David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2018-02-20 20:18 UTC (permalink / raw)
  To: Stephen Hemminger, netdev; +Cc: Stephen Hemminger

On 2/20/18 12:08 PM, Stephen Hemminger wrote:
> From: Stephen Hemminger <sthemmin@microsoft.com>
> 
> Putting whole string "master eth0" in the interface name color
> is wrong and confusing. Let's just turn color off for all attributes
> of device.
> 
> Fixes: d92cc2d087b0 ("ipaddress: ll_map: Replace ll_idx_n2a() with ll_index_to_name()")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  ip/ipaddress.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 

Change in behavior too. Applied to iproute2-next

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-20 20:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 19:08 [PATCH iproute2-next] ip: don't colorize the master device Stephen Hemminger
2018-02-20 20:18 ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).