From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D31275A63 for ; Tue, 13 Oct 2015 16:58:56 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 13 Oct 2015 07:58:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,678,1437462000"; d="scan'208";a="791601929" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by orsmga001.jf.intel.com with SMTP; 13 Oct 2015 07:58:53 -0700 Received: by (sSMTP sendmail emulation); Tue, 13 Oct 2015 15:58:52 +0025 Date: Tue, 13 Oct 2015 15:58:52 +0100 From: Bruce Richardson To: Tiwei Bie Message-ID: <20151013145852.GA34332@bricha3-MOBL3> References: <1444726446-8106-1-git-send-email-btw@mail.ustc.edu.cn> <1444726446-8106-2-git-send-email-btw@mail.ustc.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444726446-8106-2-git-send-email-btw@mail.ustc.edu.cn> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal/bsd: reinitialize optind and optreset to 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 14:58:57 -0000 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 Acked-by: Bruce Richardson