[dpdk-dev] [PATCH v2] eal: don't reset getopt lib

2015-11-04 Thread Thomas Monjalon
> > > Someone may need to call rte_eal_init() with a fake argc/argv array > > > in the middle of using getopt() to parse its own unrelated argc/argv > > > parameters. So getopt lib shouldn't be reset by rte_eal_init(). > > > > > > Now eal will always save optind, optarg and optopt (and optreset on

[dpdk-dev] [PATCH v2] eal: don't reset getopt lib

2015-10-21 Thread Tiwei Bie
On Wed, Oct 21, 2015 at 07:33:42AM +0200, David Marchand wrote: > On Mon, Oct 19, 2015 at 3:16 PM, Bruce Richardson intel.com> > wrote: > > > On Mon, Oct 19, 2015 at 09:13:10PM +0800, Tiwei Bie wrote: > > > Someone may need to call rte_eal_init() with a fake argc/argv array > > > in the middle of

[dpdk-dev] [PATCH v2] eal: don't reset getopt lib

2015-10-21 Thread David Marchand
On Mon, Oct 19, 2015 at 3:16 PM, Bruce Richardson < bruce.richardson at intel.com> wrote: > On Mon, Oct 19, 2015 at 09:13:10PM +0800, Tiwei Bie wrote: > > Someone may need to call rte_eal_init() with a fake argc/argv array > > in the middle of using getopt() to parse its own unrelated argc/argv >

[dpdk-dev] [PATCH v2] eal: don't reset getopt lib

2015-10-19 Thread Tiwei Bie
Someone may need to call rte_eal_init() with a fake argc/argv array in the middle of using getopt() to parse its own unrelated argc/argv parameters. So getopt lib shouldn't be reset by rte_eal_init(). Now eal will always save optind, optarg and optopt (and optreset on FreeBSD) at the beginning, in

[dpdk-dev] [PATCH v2] eal: don't reset getopt lib

2015-10-19 Thread Bruce Richardson
On Mon, Oct 19, 2015 at 09:13:10PM +0800, Tiwei Bie wrote: > Someone may need to call rte_eal_init() with a fake argc/argv array > in the middle of using getopt() to parse its own unrelated argc/argv > parameters. So getopt lib shouldn't be reset by rte_eal_init(). > > Now eal will always save opt