From patchwork Sat Jul 2 05:10:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 940122 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p625AnE8006738 for ; Sat, 2 Jul 2011 05:10:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751120Ab1GBFKw (ORCPT ); Sat, 2 Jul 2011 01:10:52 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:35815 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750936Ab1GBFKv (ORCPT ); Sat, 2 Jul 2011 01:10:51 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so3288158iwn.19 for ; Fri, 01 Jul 2011 22:10:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=wwToOFd7JLgsXI+AsO3SG0AIJCHmVtSEy1p1eGEiOrQ=; b=ZTeG9DADj9so5wJwNf69pL9MnOkg3FBSqp/FuUjBHVwghZvrqciyQPHn9oPKftVAss ppHv1heSILtSDnhT8it5sSSt6K1XpxzG4VVna1ne2TVhHwe0jDm/jbHxZKgM/Gsw9cL4 L6Mc4v/urmJ8XQm9wXCfN+pZVF5vG+xcRMYJY= Received: by 10.42.154.198 with SMTP id r6mr3896888icw.276.1309583451509; Fri, 01 Jul 2011 22:10:51 -0700 (PDT) Received: from localhost.localdomain (69-165-144-226.dsl.teksavvy.com [69.165.144.226]) by mx.google.com with ESMTPS id a9sm1507011icy.6.2011.07.01.22.10.50 (version=SSLv3 cipher=OTHER); Fri, 01 Jul 2011 22:10:50 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, Michal Marek Cc: Arnaud Lacombe Subject: [PATCH 3/5] kconfig/conf: add command line options' description Date: Sat, 2 Jul 2011 01:10:38 -0400 Message-Id: <1309583440-4795-4-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty In-Reply-To: <1309583440-4795-1-git-send-email-lacombar@gmail.com> References: <1307386711-8866-1-git-send-email-lacombar@gmail.com> <1309583440-4795-1-git-send-email-lacombar@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sat, 02 Jul 2011 05:10:52 +0000 (UTC) Signed-off-by: Arnaud Lacombe --- scripts/kconfig/conf.c | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 6431f5c..819ab18 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -457,8 +457,28 @@ static struct option long_opts[] = { {NULL, 0, NULL, 0} }; +static void conf_usage(const char *progname) +{ + + printf("Usage: %s [option] \n", progname); + printf("[option] is _one_ of the following:\n"); + printf(" --listnewconfig List new options\n"); + printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); + printf(" --oldconfig Update a configuration using a provided .config as base\n"); + printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); + printf(" --oldnoconfig Same as silentoldconfig but set new symbols to no\n"); + printf(" --defconfig New config with default defined in \n"); + printf(" --savedefconfig Save the minimal current configuration to \n"); + printf(" --allnoconfig New config where all options are answered with no\n"); + printf(" --allyesconfig New config where all options are answered with yes\n"); + printf(" --allmodconfig New config where all options are answered with mod\n"); + printf(" --alldefconfig New config with all symbols set to default\n"); + printf(" --randconfig New config with random answer to all options\n"); +} + int main(int ac, char **av) { + const char *progname = av[0]; int opt; const char *name, *defconfig_file = NULL /* gcc uninit */; struct stat tmpstat; @@ -492,14 +512,24 @@ int main(int ac, char **av) srand(seed); break; } + case oldaskconfig: + case oldconfig: + case allnoconfig: + case allyesconfig: + case allmodconfig: + case alldefconfig: + case listnewconfig: + case oldnoconfig: + break; case '?': - fprintf(stderr, _("See README for usage info\n")); + conf_usage(progname); exit(1); break; } } if (ac == optind) { printf(_("%s: Kconfig file missing\n"), av[0]); + conf_usage(progname); exit(1); } name = av[optind];