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

2015-10-19 Thread Tiwei Bie
On Mon, Oct 19, 2015 at 11:36:41AM +0100, Bruce Richardson wrote: > On Thu, Oct 15, 2015 at 07:46:04PM +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 l

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

2015-10-19 Thread Bruce Richardson
On Thu, Oct 15, 2015 at 07:46:04PM +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

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

2015-10-16 Thread Tiwei Bie
On Thu, Oct 15, 2015 at 04:22:53PM +, Don Provan wrote: > Looks perfect. Thanks! Thanks! It's my pleasure. :-) Best wishes, Tiwei Bie > -don > > -Original Message- > From: Tiwei Bie [mailto:btw at mail.ustc.edu.cn] > Sent: Thursday, October 15, 2015 4:46 AM > To: Don Provan ; bruce

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

2015-10-15 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] eal: don't reset getopt lib

2015-10-15 Thread Don Provan
Looks perfect. Thanks! -don -Original Message- From: Tiwei Bie [mailto:b...@mail.ustc.edu.cn] Sent: Thursday, October 15, 2015 4:46 AM To: Don Provan ; bruce.richardson at intel.com; dev at dpdk.org Subject: [PATCH] eal: don't reset getopt lib Someone may need to call rte_eal_init() wit