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: roy.fan.zh...@intel.com > > Reported-by: David Marchand <david.march...@redhat.com> > Signed-off-by: Ibtisam Tariq <ibtisam.ta...@emumba.com> > --- > 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 <maxime.coque...@redhat.com> Thanks, Maxime