diff mbox series

[v4,01/11] eal: explain argv behaviour during init

Message ID 20210321223116.1340974-2-thomas@monjalon.net (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers show
Series improve options help | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon March 21, 2021, 10:31 p.m. UTC
After argument parsing done by rte_eal_init(),
the remaining arguments are to be parsed by the application
by progressing in the argv array.
In this context, the first string represented by argv[0] is still
the same program name as the original argv[0],
while the next strings are the application arguments.
This is because rte_eal_init() manipulates the argv array
after EAL parsing, before returning to the application.

This note was missing in the doxygen comment of the API.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 lib/librte_eal/include/rte_eal.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h
index eaf6469e50..0cbeedb594 100644
--- a/lib/librte_eal/include/rte_eal.h
+++ b/lib/librte_eal/include/rte_eal.h
@@ -76,6 +76,8 @@  int rte_eal_iopl_init(void);
  * @param argv
  *   An array of strings.  The contents of the array, as well as the strings
  *   which are pointed to by the array, may be modified by this function.
+ *   The program name pointer argv[0] is copied into the last parsed argv
+ *   so that argv[0] is still the same after deducing the parsed arguments.
  * @return
  *   - On success, the number of parsed arguments, which is greater or
  *     equal to zero. After the call to rte_eal_init(),