From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 2/2] eal: add help option Date: Tue, 03 Feb 2015 09:20:31 +0100 Message-ID: <2737083.7r1iOF2V6p@xps13> 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: David Marchand Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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