From: Bruce Richardson <bruce.richardson@intel.com>
To: Tiwei Bie <btw@mail.ustc.edu.cn>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] eal/bsd: reinitialize optind and optreset to 1
Date: Tue, 13 Oct 2015 15:58:52 +0100 [thread overview]
Message-ID: <20151013145852.GA34332@bricha3-MOBL3> (raw)
In-Reply-To: <1444726446-8106-2-git-send-email-btw@mail.ustc.edu.cn>
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@mail.ustc.edu.cn>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
next prev parent reply other threads:[~2015-10-13 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 8:54 [dpdk-dev] [PATCH] Found a bug related to getopt() in eal/bsd module Tiwei Bie
2015-10-13 8:54 ` [dpdk-dev] [PATCH] eal/bsd: reinitialize optind and optreset to 1 Tiwei Bie
2015-10-13 14:58 ` Bruce Richardson [this message]
2015-10-13 17:14 ` Don Provan
[not found] ` <20151014022843.GA26774@dell>
2015-10-14 9:31 ` Bruce Richardson
2015-10-14 10:19 ` Tiwei Bie
2015-10-14 11:28 ` Tiwei Bie
2015-10-14 17:54 ` Don Provan
2015-10-15 1:40 ` Tiwei Bie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151013145852.GA34332@bricha3-MOBL3 \
--to=bruce.richardson@intel.com \
--cc=btw@mail.ustc.edu.cn \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).