[v1,14/15] examples/l2fwd: use fprint instead of printf for usage print

Message ID 1528976946-14396-15-git-send-email-anoob.joseph@caviumnetworks.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v1,01/15] examples/l2fwd: add new header to move common code |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Anoob Joseph June 14, 2018, 11:49 a.m. UTC
  Following the convention of l3fwd, using fprintf instead of printf for
printing usage.

Signed-off-by: Anoob Joseph <anoob.joseph@caviumnetworks.com>
---
v1:
* No change

 examples/l2fwd/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 05f9d28..3b697d1 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -64,7 +64,9 @@  struct rte_mempool * l2fwd_pktmbuf_pool = NULL;
 static void
 l2fwd_usage(const char *prgname)
 {
-	printf("%s [EAL options] -- -p PORTMASK [-q NQ]\n"
+	fprintf(stderr, "%s [EAL options] --"
+		" -p PORTMASK"
+		" [-q NQ]\n"
 	       "  -p PORTMASK: hexadecimal bitmask of ports to configure\n"
 	       "  -q NQ: number of queue (=ports) per lcore (default is 1)\n"
 		   "  -T PERIOD: statistics will be refreshed each PERIOD seconds (0 to disable, 10 default, 86400 maximum)\n"