[ovs-dev] [PATCH v1] command-line.c: Support parsing ctl options via env variable
aginwala at ebay.com
Fri Oct 25 05:44:27 UTC 2019
Thanks Ben for the review:
Yes you are right, current patch is buggy as using same string twice with strtok_r() was always using first option instead of n options. Thanks for pointing out about svec.[ch]. I sent v2 https://patchwork.ozlabs.org/patch/1183774/ to address the same. PTAL.
From: Ben Pfaff <blp at ovn.org>
Sent: Thursday, October 24, 2019 6:14 PM
To: amginwal at gmail.com <amginwal at gmail.com>
Cc: dev at openvswitch.org <dev at openvswitch.org>; Ginwala, Aliasgar <aginwala at ebay.com>
Subject: Re: [ovs-dev] [PATCH v1] command-line.c: Support parsing ctl options via env variable
On Tue, Oct 15, 2019 at 06:52:34PM -0700, amginwal at gmail.com wrote:
> From: Aliasgar Ginwala <aginwala at ebay.com>
> Signed-off-by: Aliasgar Ginwala <aginwala at ebay.com>
I'm pretty sure this code doesn't work properly because it tries to
parse the same string twice with strtok_r(), which is going to truncate
it after the first option. Did you try it with more than one
space-separated option in the environment variable?
lib/svec.[ch] would make it easier to write this.
More information about the dev