> -----Original Message-----
> From: Richardson, Bruce <bruce.richard...@intel.com>
> Sent: Friday, May 20, 2022 11:13 PM
> To: dev@dpdk.org
> Cc: sta...@dpdk.org; Li, WeiyuanX <weiyuanx...@intel.com>; Richardson,
> Bruce <bruce.richard...@intel.com>; Olivier Matz
> <olivier.m...@6wind.com>; Ray Kinsella <m...@ashroe.eu>
> Subject: [PATCH v2 1/2] cmdline: add function to verify valid commands
> 
> The cmdline library cmdline_parse() function parses a command and
> executes the action automatically too. The cmdline_valid_buffer function
> also uses this function to validate commands, meaning that there is no
> function to validate a command as ok without executing it.
> 
> To fix this omission, we extract the body of cmdline_parse into a new static
> inline function with an extra parameter to indicate whether the action should
> be performed or not. Then we create two wrappers around that - a
> replacement for the existing cmdline_parse function where the extra
> parameter is "true" to execute the command, and a new function
> "cmdline_parse_check" which passes the parameter as "false" to perform
> cmdline validation only.
> 
> Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> ---

Tested-by:  Weiyuan Li  <weiyuanx...@intel.com>

Regards,
Li, Weiyuan

Reply via email to