Skip to contentSkip to conversation

ip: don't colorize the master device

PATCH In review Stephen Hemminger 2 participants 2 messages Feb 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip: don't colorize the master device

From: Stephen Hemminger <[email protected]>

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()")
---
 ip/ipaddress.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
ip/ipaddress.c +3 -5
index 1380453984d5..768e2ed27e76 100644
@@ -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])
Signature · 1 line
2.16.1
#1 lore raw
Quoted 6 lines · Stephen Hemminger

From: Stephen Hemminger <[email protected]>

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.

Quoted 6 lines
Fixes d92cc2d087b0 ("ipaddress: ll_map: Replace ll_idx_n2a() with ll_index_to_name()")
---
 ip/ipaddress.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Change in behavior too. Applied to iproute2-next