From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by dpdk.org (Postfix) with ESMTP id 24FBA9AEF for ; Tue, 3 Feb 2015 10:07:27 +0100 (CET) Received: by mail-oi0-f43.google.com with SMTP id z81so48245056oif.2 for ; Tue, 03 Feb 2015 01:07:26 -0800 (PST) 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=nGPuXPLiFULtU0qHCKcmIslC5ybZXNYbaTO6+Z7Hd9E=; b=PESJqJ0sbnPMkutwbEC9Qj/N+PWMyNcZGfU9nWcIB9Qfmb7KyeFdv4UUWI4YNfZWfJ GHCmj+G2urGFtYiDvKKBG87QfWPIUGQllXsSUzzcHsQxSXTH66w8TwvvztMIyM5+N+vM Uu8LQBcmDQ5pcD1o8ot0MR5MBu7YfykXkFmBJlvmsiyaj5RGfi6H3Z2xmvq/vM72Xefv bXT4E5zWYumQAAin25pFnuneIc0+g+vQgm3gFPCbQtV5+efL6TfSdojf4hFBUQlyhBwo bOcQjOvHs15X/lLvueFBPs5ZR3QR2VHXVL07VfRQ2VxVYvhThP8dAUubjUx1srddgfRL xvzQ== X-Gm-Message-State: ALoCoQkMLjwuGy1wsIN8gG48yMMiwrly+aHdtf7J49D0hW3qeEpE8JVRhfdvJ6PplajEyyQy6g85 MIME-Version: 1.0 X-Received: by 10.60.60.2 with SMTP id d2mr14896013oer.10.1422954446385; Tue, 03 Feb 2015 01:07:26 -0800 (PST) Received: by 10.76.95.198 with HTTP; Tue, 3 Feb 2015 01:07:26 -0800 (PST) In-Reply-To: <2737083.7r1iOF2V6p@xps13> References: <1422554832-30093-1-git-send-email-thomas.monjalon@6wind.com> <1422899093-20207-3-git-send-email-thomas.monjalon@6wind.com> <2737083.7r1iOF2V6p@xps13> Date: Tue, 3 Feb 2015 10:07:26 +0100 Message-ID: From: David Marchand To: Thomas Monjalon Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 09:07:27 -0000 On Tue, Feb 3, 2015 at 9:20 AM, Thomas Monjalon wrote: > 2015-02-03 07:33, David Marchand: > > On Mon, Feb 2, 2015 at 6:44 PM, Thomas Monjalon < > thomas.monjalon@6wind.com> > > 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. > Oh right ... Then, I suppose it is fine like this. Acked-by: David Marchand -- David Marchand