From patchwork Sun Dec 5 06:35:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 380641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB56aBSY015917 for ; Sun, 5 Dec 2010 06:36:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899Ab0LEGgM (ORCPT ); Sun, 5 Dec 2010 01:36:12 -0500 Received: from mail-yx0-f174.google.com ([209.85.213.174]:48417 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751481Ab0LEGgL (ORCPT ); Sun, 5 Dec 2010 01:36:11 -0500 Received: by yxt3 with SMTP id 3so4972274yxt.19 for ; Sat, 04 Dec 2010 22:36:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=yiSBXMf3ObYRaV0+/zYFia1eZhRWzkkSw8heGK8mUVM=; b=Er+DO93v0s6wmhfojBnmbsqlwdhLYUr8bk2RM3KKWQacoyrcE3DM5cSQ+O9HSk9QDU o1tBqvvGzoH92dS+UGiEQjBQerbKTbRBJ5GKZ5KbK9Iadbi5Xi9QcOJ3xZPXsoA9gatb b4YmxEyTEOhpoYavViOqf4dMdEMQql5KSLtDc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=U8QdpZd/tR7AT15kK4CSzXa/D3mRuiZPl6lVY+908azXb22xrIAsgWj2eF6HBamF/b YGqJ/aZUgcv68fTI0/m2WRtvCxFNVePpAk9H6qWxNXjjJgtpeJHw7ng5HWbbfS+RXSpp XGWw82ofiWAr5MHkCkzUhXGXnoxc7WJUdDpuM= Received: by 10.151.79.18 with SMTP id g18mr7146974ybl.209.1291530971410; Sat, 04 Dec 2010 22:36:11 -0800 (PST) Received: from localhost.localdomain (75-119-248-218.dsl.teksavvy.com [75.119.248.218]) by mx.google.com with ESMTPS id 31sm2268856yhl.30.2010.12.04.22.36.10 (version=SSLv3 cipher=RC4-MD5); Sat, 04 Dec 2010 22:36:10 -0800 (PST) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org Cc: Arnaud Lacombe , Ben Hutchings Subject: [PATCH 2/2] [RFC] kconfig/listnewconfig: show default value of new symbel Date: Sun, 5 Dec 2010 01:35:19 -0500 Message-Id: <1291530919-5601-2-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.2.30.gc37d7.dirty In-Reply-To: <1291530919-5601-1-git-send-email-lacombar@gmail.com> References: <1291530919-5601-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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 05 Dec 2010 06:36:12 +0000 (UTC) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 5459a38..1b58129 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -411,6 +411,17 @@ conf_childs: indent -= 2; } + +static void +listnewconfig_print_symbol(FILE *fp, struct symbol *sym, const char *val, void *arg) +{ + fprintf(fp, "%s%s (default: %s)\n", CONFIG_, sym->name, val); +} + +static struct conf_printer listnewconfig_printers = { + .print_symbol = listnewconfig_print_symbol, +}; + static void check_conf(struct menu *menu) { struct symbol *sym; @@ -425,7 +436,8 @@ static void check_conf(struct menu *menu) (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { if (input_mode == listnewconfig) { if (sym->name && !sym_is_choice_value(sym)) { - printf("%s%s\n", CONFIG_, sym->name); + conf_write_symbol(stdout, sym, + &listnewconfig_printers, NULL); } } else if (input_mode != oldnoconfig) { if (!conf_cnt++) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 31d06da..6f2f3a4 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -548,8 +548,8 @@ static struct conf_printer tristate_printer_cb = * */ -static void conf_write_symbol(FILE *fp, struct symbol *sym, - struct conf_printer *printer, void *printer_arg) +void conf_write_symbol(FILE *fp, struct symbol *sym, + struct conf_printer *printer, void *printer_arg) { const char *str;