[dpdk-dev] [PATCH] eal/bsd: reinitialize optind and optreset to 1
Bruce Richardson
bruce.richardson at intel.com
Tue Oct 13 16:58:52 CEST 2015
On Tue, Oct 13, 2015 at 04:54:06PM +0800, Tiwei Bie wrote:
> The variable optind must be reinitialized to 1 in order to skip over
> argv[0] on FreeBSD. Because getopt() on FreeBSD will return -1 when
> it meets an argument which doesn't start with '-'.
>
> The variable optreset is provided on FreeBSD to indicate the additional
> set of calls to getopt(). So, also reinitialize it to 1.
>
> Signed-off-by: Tiwei Bie <btw at mail.ustc.edu.cn>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list