cmdline: support dynamic tokens
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Wed, 21 Dec 2016 14:51:20 +0000 (15:51 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 23 Dec 2016 09:18:25 +0000 (10:18 +0100)
commit4fffc05a2b2c52262b302b1e32388f6ad64f14d8
treeab91fa7dc1442879901ed91f4ae93f70b599f8c9
parent7fdcde6f3320463e37b505e6ce1604e3594c1e29
cmdline: support dynamic tokens

Considering tokens must be hard-coded in a list part of the instruction
structure, context-dependent tokens cannot be expressed.

This commit adds support for building dynamic token lists through a
user-provided function, which is called when the static token list is empty
(a single NULL entry).

Because no structures are modified (existing fields are reused), this
commit has no impact on the current ABI.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
lib/librte_cmdline/cmdline_parse.c
lib/librte_cmdline/cmdline_parse.h