On 2/4/21 8:34 AM, Ibtisam Tariq wrote: > Instead of using getopt_long return value, strcmp was used to > compare the input parameters with the struct option array. This > patch get rid of all those strcmp by directly binding each longopt > with an int enum. This is to improve readability and consistency in > all examples. > > Bugzilla ID: 238 > Cc: [email protected] > > Reported-by: David Marchand <[email protected]> > Signed-off-by: Ibtisam Tariq <[email protected]> > --- > v4: > * Set indentation of preprocessor directives. > > v3: > * None. > > v2: > * Remove extra indentations. > * Remove extra block brackets in switch statement. > * Change enum names to start with OPT_ and remove KEYWORD from enum names. > * Remove unused short options. > > v1: > * enhance getopt_long usage. > --- > examples/vhost_crypto/main.c | 86 +++++++++++++++++++++--------------- > 1 file changed, 50 insertions(+), 36 deletions(-) Reviewed-by: Maxime Coquelin <[email protected]> Thanks, Maxime

