Skip to contentSkip to conversation

examples/kni: add CR character at print log

PATCH In review Tianli Lai 3 participants 3 messages Mar 7, 2022 – Mar 8, 2022

lore
Share & tools
lore

Tianli Lai

author
#0 lore raw

PATCH 1/1 examples/kni: add CR character at print log

add CR character at print link state information

---
 examples/kni/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/kni/main.c +1 -1
index f5b20a7b62..e99ef5c38a 100644
@@ -719,7 +719,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
 
 	rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
 	if (prev != link->link_status)
-		RTE_LOG(INFO, APP, "%s NIC %s",
+		RTE_LOG(INFO, APP, "%s NIC %s\n",
 			rte_kni_get_name(kni),
 			link_status_text);
 }
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · Tianli Lai

add CR character at print link state information

---
  examples/kni/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
examples/kni/main.c +0 -0
index f5b20a7b62..e99ef5c38a 100644

examples/kni/main.c log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link) · line 725

Quoted 8 lines
examples/kni/main.c +1 -1
@@ -719,7 +719,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
 
  	rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
  	if (prev != link->link_status)
-		RTE_LOG(INFO, APP, "%s NIC %s",
+		RTE_LOG(INFO, APP, "%s NIC %s\n",
  			rte_kni_get_name(kni),
  			link_status_text);
  }
Fixes db4e81351fb8 ("examples: use new link status print format")
#2 lore raw

07/03/2022 15:52, Ferruh Yigit:

Quoted 25 lines · Tianli Lai
Quoted 12 lines

add CR character at print link state information

---
  examples/kni/main.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
examples/kni/main.c +0 -0
index f5b20a7b62..e99ef5c38a 100644

examples/kni/main.c log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link) · line 725

Quoted 8 lines
examples/kni/main.c +1 -1
@@ -719,7 +719,7 @@ log_link_state(struct rte_kni *kni, int prev, struct rte_eth_link *link)
 
  	rte_eth_link_to_str(link_status_text, sizeof(link_status_text), link);
  	if (prev != link->link_status)
-		RTE_LOG(INFO, APP, "%s NIC %s",
+		RTE_LOG(INFO, APP, "%s NIC %s\n",
  			rte_kni_get_name(kni),
  			link_status_text);
  }
Fixes db4e81351fb8 ("examples: use new link status print format")
Quoted 1 line

Applied with title "examples/kni: add missing trailing newline in log"