Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4486961ybx; Mon, 4 Nov 2019 14:14:10 -0800 (PST) X-Google-Smtp-Source: APXvYqwNXCG3pNSWq42rIZTYiJBuyEaatvuRZG/fsexAOY62EGuITUogXu7LTJXLSOmZB+cPz130 X-Received: by 2002:aa7:d709:: with SMTP id t9mr30641397edq.266.1572905650331; Mon, 04 Nov 2019 14:14:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905650; cv=none; d=google.com; s=arc-20160816; b=SkOJ+5WTJ88VtG253o3Z2UPbSGm0nnZUb58DC4xCTyDM2Sn5tFGTZeGwhwXZUeJNv0 rPtyz/6K5iqtolqBIXtRh7VBayZZY06HP7DGlbhRtcjS/FdVQRf/6CHwZvLfAfVmyB7+ T22oEQlNayZN49jFc+iULBh5BbUMzch4FRAFNObuVEN6xxRTW5es756vbFf0eYqMphHC 2+j31/ZBrJhuhr253PlidENrOaHjL40uxADabUqsuRNLKLrBX8dhSSuNsIB1NHCXqX3h Olm6h9brJaqYydTMoTMhIxagJo/fk1kx8Ql5iszFIGQUPCeK7AEURN15XGL4/GSHIsh5 9rgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=B6nIaarjvtOgizveiVSrnR0SvuKBMT/SgTR8AIczCsU=; b=doMi2VMHwyqrNsMru0xACg9b0hv/pAYs8SK/7hyiJxsLC7TkWG7GPgx8wu4mesjtsC ZOV3wWATVfoBV9R6FaOzG/ouzK0aE95vEBVwMLyWDe4OyIIxm5uat/CHbF7eMYkPE3fV nFd9U0EyIQUw8PxockX4SuxtDkSOc01YU5CGx+ZoRaIdpKXgojqpdpV+mfOS67M8Mxcu 93YAdcerDemZhIkE0GJKFjbb1Fqht2ViN9V6fOd9RqkqmzlufNXu5YKWaSm4iGNduG5T YQq3MDS6E2w14YEg53ZX7gx7miAua7m1SBhGLoNTDhayQh6d1sRg1p8fGV9FP4EyKsfx gdLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si12964111ejx.60.2019.11.04.14.13.47; Mon, 04 Nov 2019 14:14:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390256AbfKDWNO (ORCPT + 99 others); Mon, 4 Nov 2019 17:13:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58376 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390511AbfKDWKN (ORCPT ); Mon, 4 Nov 2019 17:10:13 -0500 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1947259455 for ; Mon, 4 Nov 2019 22:10:13 +0000 (UTC) Received: by mail-qt1-f200.google.com with SMTP id l5so20283051qtj.8 for ; Mon, 04 Nov 2019 14:10:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=B6nIaarjvtOgizveiVSrnR0SvuKBMT/SgTR8AIczCsU=; b=kkUM5sqCH3PTgYHcgVYg59rvaoLA3aprI8w2w72du9DSDLkRAEi17nad1c1rVr8Ndp 1v2WGBSzkiu/c8/LsHPhI/bvDBHD8+TwJSPYgknsSAGkJVTgM1FEycFg+aZn97kJ76u+ cyN0v2pG0JWe1b1x7v/Kv2XkLmu/cKhoLJn5zZlbrJMiQMoS/R04vWxvoC07Sf7kqnD8 5j2ekMAszDy7Flau6NKa7jlUjNy9N/4HWt2J7Xy2Le4em1awKSoMa/cTiPyEWkm5xgh1 w9BodFoE0AJai4naYDSY7MtrO7470ZICPiratn9NeUbqeKUhxtx5wqMGriPjzPldAjOm aSVg== X-Gm-Message-State: APjAAAVAPR7IzSHC9lHQUkUoNyAxd1nsFWPKq5ia2Gd7lPnLjm7UycgM yl3Od95567kxnv7728c56sos4gaWQ7aVYryCAUX1ZRtaW7Hyn0p+YmmLaHaG5yogw3+B7F0xAFS 8UXTqteB2JA5/aMWKB6LqGWdG X-Received: by 2002:a37:4f10:: with SMTP id d16mr19833154qkb.80.1572905412193; Mon, 04 Nov 2019 14:10:12 -0800 (PST) X-Received: by 2002:a37:4f10:: with SMTP id d16mr19833120qkb.80.1572905411873; Mon, 04 Nov 2019 14:10:11 -0800 (PST) Received: from labbott-redhat.redhat.com (pool-96-235-39-235.pitbpa.fios.verizon.net. [96.235.39.235]) by smtp.gmail.com with ESMTPSA id o3sm9774304qkf.97.2019.11.04.14.10.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2019 14:10:11 -0800 (PST) From: Laura Abbott To: Masahiro Yamada Cc: Laura Abbott , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, jcline@redhat.com, dzickus@redhat.com, Randy Dunlap Subject: [PATCHv2] kconfig: Add option to get the full help text with listnewconfig Date: Mon, 4 Nov 2019 17:10:08 -0500 Message-Id: <20191104221008.30078-1-labbott@redhat.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org make listnewconfig will list the individual options that need to be set. This is useful but there's no easy way to get the help text associated with the options at the same time. Introduce a new targe 'make helpnewconfig' which lists the full help text of all the new options as well. This makes it easier to automatically generate changes that are easy for humans to review. This command also adds markers between each option for easier parsing. Signed-off-by: Laura Abbott --- v2: Dropped rfc tag, renamed extendedlistnewconfig -> helpnewconfig. Added another missing help text. --- scripts/kconfig/Makefile | 5 ++++- scripts/kconfig/conf.c | 13 ++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index ef2f2336c469..71a956cec64a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -66,7 +66,9 @@ localyesconfig localmodconfig: $(obj)/conf # syncconfig has become an internal implementation detail and is now # deprecated for external use simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ - alldefconfig randconfig listnewconfig olddefconfig syncconfig + alldefconfig randconfig listnewconfig olddefconfig syncconfig \ + helpnewconfig + PHONY += $(simple-targets) $(simple-targets): $(obj)/conf @@ -134,6 +136,7 @@ help: @echo ' alldefconfig - New config with all symbols set to default' @echo ' randconfig - New config with random answer to all options' @echo ' listnewconfig - List new options' + @echo ' helpnewconfig - List new options and help text' @echo ' olddefconfig - Same as oldconfig but sets new symbols to their' @echo ' default value without prompting' @echo ' kvmconfig - Enable additional options for kvm guest kernel support' diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 40e16e871ae2..1f89bf1558ce 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -32,6 +32,7 @@ enum input_mode { defconfig, savedefconfig, listnewconfig, + helpnewconfig, olddefconfig, }; static enum input_mode input_mode = oldaskconfig; @@ -434,6 +435,11 @@ static void check_conf(struct menu *menu) printf("%s%s=%s\n", CONFIG_, sym->name, str); } } + } else if (input_mode == helpnewconfig) { + printf("-----\n"); + print_help(menu); + printf("-----\n"); + } else { if (!conf_cnt++) printf("*\n* Restart config...\n*\n"); @@ -459,6 +465,7 @@ static struct option long_opts[] = { {"alldefconfig", no_argument, NULL, alldefconfig}, {"randconfig", no_argument, NULL, randconfig}, {"listnewconfig", no_argument, NULL, listnewconfig}, + {"helpnewconfig", no_argument, NULL, helpnewconfig}, {"olddefconfig", no_argument, NULL, olddefconfig}, {NULL, 0, NULL, 0} }; @@ -469,6 +476,7 @@ static void conf_usage(const char *progname) printf("Usage: %s [-s] [option] \n", progname); printf("[option] is _one_ of the following:\n"); printf(" --listnewconfig List new options\n"); + printf(" --helpnewconfig List new options and help text\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(" --syncconfig Similar to oldconfig but generates configuration in\n" @@ -543,6 +551,7 @@ int main(int ac, char **av) case allmodconfig: case alldefconfig: case listnewconfig: + case helpnewconfig: case olddefconfig: break; case '?': @@ -576,6 +585,7 @@ int main(int ac, char **av) case oldaskconfig: case oldconfig: case listnewconfig: + case helpnewconfig: case olddefconfig: conf_read(NULL); break; @@ -657,6 +667,7 @@ int main(int ac, char **av) /* fall through */ case oldconfig: case listnewconfig: + case helpnewconfig: case syncconfig: /* Update until a loop caused no more changes */ do { @@ -675,7 +686,7 @@ int main(int ac, char **av) defconfig_file); return 1; } - } else if (input_mode != listnewconfig) { + } else if (input_mode != listnewconfig && input_mode != helpnewconfig) { if (!no_conf_write && conf_write(NULL)) { fprintf(stderr, "\n*** Error during writing of the configuration.\n\n"); exit(1); -- 2.21.0