From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f170.google.com (mail-ob0-f170.google.com [209.85.214.170]) by dpdk.org (Postfix) with ESMTP id A1B198DAF for ; Wed, 21 Oct 2015 07:33:43 +0200 (CEST) Received: by obbwb3 with SMTP id wb3so32692260obb.0 for ; Tue, 20 Oct 2015 22:33:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bgXuqsysG9w9So55yniQtZlQyiuzEz6TPzzEnhw+2JU=; b=WBf89vj+s851Iai98ULdXUzsB1M1cPh+O/O8XlJ00UQ3Dl5zy6g45Y35AmHfGOOnrr 5s5/HrcNTLfa/AMHhYVefBnMqCZuUQ5oJfo7VRMfYsH9JhS1Xfvn1DuW7AZRZsBHAqNu 1oTsAYYTeSmnIAH1hKkWWxjNpiwMfE7qpIeYR4+P7it2NtJpXEZMw7uUU8w6AxhN99w0 tIrKfNTDe401mhmYQ62mQV67uaFL9GkieoF4mmP4KMirshU63Gm73AuIqzWWizZIOvFM 3/8DwQu07IkMpm37r7jh8HjWs0OfFQT488d/QVv6uRys1PYKu/eyiJuv4NWhMUW7tufK Iltw== X-Gm-Message-State: ALoCoQkz3J9D+BGj6v4BLOPeS2N/EuFlOf8rF1kkNi2d2YKKXYYKKwXJ/Rs2OftLLB9Ly/cxF4Dk MIME-Version: 1.0 X-Received: by 10.60.178.74 with SMTP id cw10mr439942oec.6.1445405623072; Tue, 20 Oct 2015 22:33:43 -0700 (PDT) Received: by 10.76.131.166 with HTTP; Tue, 20 Oct 2015 22:33:42 -0700 (PDT) In-Reply-To: <20151019131617.GB13556@bricha3-MOBL3> References: <1444909564-53691-1-git-send-email-btw@mail.ustc.edu.cn> <1445260390-78613-1-git-send-email-btw@mail.ustc.edu.cn> <20151019131617.GB13556@bricha3-MOBL3> Date: Wed, 21 Oct 2015 07:33:42 +0200 Message-ID: From: David Marchand To: Bruce Richardson Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" , dprovan@bivio.net Subject: Re: [dpdk-dev] [PATCH v2] eal: don't reset getopt lib 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: Wed, 21 Oct 2015 05:33:44 -0000 On Mon, Oct 19, 2015 at 3:16 PM, Bruce Richardson < bruce.richardson@intel.com> wrote: > 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 > > Suggested-by: Bruce Richardson > > Signed-off-by: Tiwei Bie > > Reviewed-by: Don Provan > > Reviewed-by: Bruce Richardson > > Acked-by: Bruce Richardson > Acked-by: David Marchand Thanks Tiwei. -- David Marchand