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 optind, optarg and optopt (and optreset on > FreeBSD) at the beginning, initialize optind (and optreset on FreeBSD) > to 1 before calling getopt_long(), then restore all values after. > > Suggested-by: Don Provan <dprovan at bivio.net> > Suggested-by: Bruce Richardson <bruce.richardson at intel.com> > Signed-off-by: Tiwei Bie <btw at mail.ustc.edu.cn> > Reviewed-by: Don Provan <dprovan at bivio.net> > Reviewed-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>