From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id 8964D9ACD for ; Tue, 3 Feb 2015 09:21:00 +0100 (CET) Received: by mail-wg0-f54.google.com with SMTP id b13so42998759wgh.13 for ; Tue, 03 Feb 2015 00:21:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=PwWag8DABD2HFpiUOQT3+Jn+4ozHHuMp8y1dyU6NziI=; b=fmck+Kx4dihHN17FwFhYQ5mAmTtcQeBf1v+oN0dQsZLCar14e8OC1b1Nvv1uCFKAiY qPc7pbWhgLqyOWg5LIE6muElE26RsNMj7ns2827RGjB+ANKS3DurupSjifREQCmX2Gbh LVpFAYZVcyxRRlnZnQ2q5l3feyDfy/4UCtYu4kRzmLcajzgF2qov+Ge1sovtvv+47P/H CJyrWyDPkbaMWgPgKCCvHBUFE+pxrc1DOnrFLeVVje3kx+TSntqAXo9fsA1f2JSWtHnK HNY8fj7Wbs/11jyQNtacA5AdN9GSKKOhfeZqv/dj9c1yi41SzR1eKCfWLRnUrlBTLBII VMbA== X-Gm-Message-State: ALoCoQkvSykvMaYOBnmJNboZSN07zf4dQdXkE5TCQC8xUq3uX1ku0lAt59l5pjmzDDqOmtC5gGAw X-Received: by 10.194.187.235 with SMTP id fv11mr51764817wjc.16.1422951660364; Tue, 03 Feb 2015 00:21:00 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id r8sm19408966wib.16.2015.02.03.00.20.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Feb 2015 00:20:59 -0800 (PST) From: Thomas Monjalon To: David Marchand Date: Tue, 03 Feb 2015 09:20:31 +0100 Message-ID: <2737083.7r1iOF2V6p@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: References: <1422554832-30093-1-git-send-email-thomas.monjalon@6wind.com> <1422899093-20207-3-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 2/2] eal: add help option 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, 03 Feb 2015 08:21:00 -0000 2015-02-03 07:33, David Marchand: > On Mon, Feb 2, 2015 at 6:44 PM, Thomas Monjalon > wrote: > [snip] > > @@ -340,6 +342,9 @@ eal_parse_args(int argc, char **argv) > > continue; > > > > switch (opt) { > > + case 'h': > > + eal_usage(prgname); > > + exit(EXIT_SUCCESS); > > default: > > if (opt < OPT_LONG_MIN_NUM && isprint(opt)) { > > RTE_LOG(ERR, EAL, "Option %c is not supported " > [snip] > > @@ -534,6 +536,10 @@ eal_parse_args(int argc, char **argv) > > continue; > > > > switch (opt) { > > + case 'h': > > + eal_usage(prgname); > > + exit(EXIT_SUCCESS); > > + > > /* force loading of external driver */ > > case 'd': > > solib = malloc(sizeof(*solib)); > > Why not move those two in common parser ? Because it's calling eal_usage() which is not callable from common parser. eal_usage() print usage for common and environment-specific options. -- Thomas