From: Harry van Haaren Date: Thu, 14 Oct 2021 09:54:44 +0000 (+0000) Subject: app/eventdev: fix terminal colour after control-c exit X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c0900d33443e0a9caca0727995d4ffb9587853bc;p=dpdk.git app/eventdev: fix terminal colour after control-c exit Before this commit, a Control^C exit of the test-eventdev application would print the worker packet percentages, and leave the terminal with a green colour despite the colour reset being issued after the newline. By moving the colour reset command before the \n the issue is fixed. Fixes: 6b1a14a83a06 ("app/eventdev: add packet distribution logs") Cc: stable@dpdk.org Signed-off-by: Harry van Haaren Acked-by: Pavan Nikhilesh --- diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index 660d5a0364..97bad18a1f 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -19,7 +19,7 @@ perf_test_result(struct evt_test *test, struct evt_options *opt) total += t->worker[i].processed_pkts; for (i = 0; i < t->nb_workers; i++) printf("Worker %d packets: "CLGRN"%"PRIx64" "CLNRM"percentage:" - CLGRN" %3.2f\n"CLNRM, i, + CLGRN" %3.2f"CLNRM"\n", i, t->worker[i].processed_pkts, (((double)t->worker[i].processed_pkts)/total) * 100);