summaryrefslogtreecommitdiff
path: root/scripts/kconfig
AgeCommit message (Collapse)Author
2011-07-29kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()Michal Marek
Replace the config_is_*() macros with a variant that allows for grepping for usage of CONFIG_* options in the code. Usage: if (IS_ENABLED(CONFIG_NUMA)) or #if IS_ENABLED(CONFIG_NUMA) The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y' or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if the option is 'm'. Only boolean and tristate options are supported. Reviewed-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-25xconfig: Abort close if configuration cannot be savedMichal Marek
Give the user an opportunity to fix the error or save the configuration under a different path. Reported-by: Hiromu Yakura <hiromu1996@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-18kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.hArnaud Lacombe
The specialized printer for headers (espectially autoconf.h) is missing fixup code for S_HEX symbol's "0x" prefix. As long as kconfig does not warn for such missing prefix, this code is needed. Fix this. In the same time, fix some nits in `header_print_symbol()'. Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Broken-by: Arnaud Lacombe <lacombar@gmail.com> Reported-by: Randy Dunlap <rdunlap@xenotime.net> Reported-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13kconfig/nconf: remove useless conditionnalArnaud Lacombe
After the test if (!submenu || ...) continue; the variable `submenu' can _not_ be NULL, so do not test for this situation. Cc: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13kconfig/nconf: prevent segfault on empty menuArnaud Lacombe
nconf does not check the validity of the current menu when help is requested (with either <F2>, '?' or 'h'). This leads to a NULL pointer dereference when an empty menu is encountered. The following reduced testcase exposes the problem: config DEP bool menu "FOO" config BAR bool "BAR" depends on DEP endmenu Issue will happen when entering menu "FOO" and requesting help. nconf is the only front-end which do not filter the validity of the current menu. Such filter can not really happen beforehand as other key which does not deals with the current menu might be entered by the user, so just bails out earlier if we encounter an invalid menu. Cc: Nir Tzachar <nir.tzachar@gmail.com> Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu> Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13kconfig/nconf: use the generic menu_get_ext_help()Arnaud Lacombe
nconf is the only front-end which does not use this helper, but prefer to copy/paste the code. The test wrt. menu validity added in this version of the code is bogus anyway as an invalid menu will get dereferenced a few line below by calling menu_get_prompt(). For now, convert nconf to use menu_get_ext_help(), as do every other front-end. We will deals with menu validity checks properly in a separate commit. Cc: Nir Tzachar <nir.tzachar@gmail.com> Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13nconfig: Avoid Wunused-but-set warningRaghavendra D Prabhu
I am seeing Wunused-but-set warning while make nconfig. Looks like active_menu is not used. Removing it fixes the warning. Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-04Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into ↵Michal Marek
kbuild/kconfig
2011-07-02kconfig/conf: mark xfgets() privateArnaud Lacombe
This function has not much reason to be public. In the mean time, convert declaration from K&R C to ISO C. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02kconfig: remove pending prototypes for kconfig_load()Arnaud Lacombe
Commit 5a6f8d2bd9e3392569ed6f29ea4d7210652f929b removed `kconfig_load()', however, it missed an hidden prototypes in `lkc.h'. Fix this. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02kconfig/conf: add command line options' descriptionArnaud Lacombe
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02kconfig/conf: reduce the scope of `defconfig_file'Arnaud Lacombe
This variable is not used outside of main() so there is not much reason keeping it global. Ensure it is initialized as gcc has no way to know that normal execution path expect only one option switch to be given on the command line (except when we request help). As a result, we always initialize `defconfig_file' before using it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-02kconfig: use calloc() for expr allocationArnaud Lacombe
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-07-01kconfig: introduce specialized printerArnaud Lacombe
Make conf_write_symbol() grammar agnostic to be able to use it from different code path. These path pass a printer callback which will print a symbol's name and its value in different format. conf_write_symbol()'s job become mostly only to prepare a string for the printer. This avoid to have to pass specialized flag to generic functions Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> [mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx macro)] Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-24kconfig: do not overwrite symbol direct dependency in assignmentArnaud Lacombe
Considering the following configuration: config F bool "F" choice AB bool "AB" config A bool "A" config B bool "B" endchoice if A config D bool default y if F select E config E bool "E" endif if B config D bool default y if F select E config E bool "E" endif The following configuration: CONFIG_F=y CONFIG_A=y # CONFIG_B is not set CONFIG_D=y CONFIG_E=y emits a spurious warning: (D) selects E which has unmet direct dependencies (B) If a symbol appears in two different branch of the tree, it should inherit the dependency of both parent, not just the last one. Reported-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr> Tested-by: Yann E. Morin <yann.morin.1998@anciens.enib.fr> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-06-08Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into ↵Michal Marek
kbuild/kconfig
2011-06-06kconfig/gconf: silent missing prototype warningsArnaud Lacombe
As the `gconf' frontend is un-maintained, go the easy way by silencing the "warning: no previous prototype for '<fn>'" warnings. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig/gconf: kill deadcodeArnaud Lacombe
The only call site of renderer_toggled() has been commented out since Apr. 2003, as per Linus' Linux history repository: commit e7f67eb3c0570aa50c1cc0707b478a6d93bdc255 Author: Roman Zippel <zippel@linux-m68k.org> Date: Fri Apr 4 04:18:05 2003 -0800 [PATCH] gconf update A gconf update by Romain Li<C3><A9>vin <roms@tilp.info> - fixed bug when double-clicking for changing value. - expand row when enabling a row with a submenu. - various bug fixes As this result in a warning: scripts/kconfig/gconf.c:891:13: warning: 'renderer_toggled' defined but not used just nuke that code. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: nuke LKC_DIRECT_LINK cruftArnaud Lacombe
This interface is not (and has never been ?) used by any frontend, just get rid of it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: nuke reference to SWIGArnaud Lacombe
SWIG is not used (yet?) to create kconfig binding, so there is no point referencing it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: add missing <stdlib.h> inclusionArnaud Lacombe
This header is needed when using {m,re}alloc(3) and free(3) function family. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: add missing <ctype.h> inclusionArnaud Lacombe
This header is needed when using isspace(3) function family. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: add missing <stdarg.h> inclusionArnaud Lacombe
This header is needed when using va_{start,end,copy}(3) functions family. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: fix return code for invalid boolean symbol in conf_set_sym_val()Arnaud Lacombe
Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-06-06kconfig: annotate non-trivial fall-troughArnaud Lacombe
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-05-25Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfigMichal Marek
2011-05-25kconfig: Only generate config_is_xxx for bool and tristate optionsMichal Marek
For strings and integers, the config_is_xxx macros are useless and sometimes misleading: #define CONFIG_INITRAMFS_SOURCE "" #define config_is_initramfs_source() 1 Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-25xconfig: merge code path to conf_write()Arnaud Lacombe
Avoid to have multiple path saving the config. This fixes an error check miss when the window is being closed and the user requested the config to be written. Reported-by: Hiromu Yakura <hiromu1996@gmail.com> Pointed-out-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfigMichal Marek
2011-05-24kconfig: do not record timestamp in .configArnaud Lacombe
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24gconfig: Hide unused left treeview when start up the interfaceEduardo Silva
When the gconfig program starts in full mode view, it shows the left treeview which belongs to the 'split mode view'. The patch fix this visual issue. Signed-off-by: Eduardo Silva <edsiper@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-24gconfig: enable rules hint for main treeviewsEduardo Silva
Due to the large amount of rows in the treeviews, is difficult to match columns with rows, setting the rules hint to 'true' allows the treeview to alternate background colors in the rows making the data more readable. Signed-off-by: Eduardo Silva <edsiper@gmail.com> Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-05-17kconfig: autogenerated config_is_xxx macroJean-Christophe PLAGNIOL-VILLARD
this will allow to use to use if(config_is_xxx()) if(config_is_xxx_module()) in the code instead of #ifdef CONFIG_xxx #ifdef CONFIG_xxx_MODULE and now let the compiler remove the non usefull code and not the pre-processor as done in the mach-types for arm as exmaple Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: quiet commands when V=0Peter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: change update-po-config to reflect new layout of arch/umPeter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: make update-po-config work in KBUILD_OUTPUTPeter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: rearrange clean-filesPeter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: change gconf to modify hostprogs-y like nconf and mconfPeter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: change qconf to modify hostprogs-y like nconf and mconfPeter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-29kconfig: only build kxgettext when neededPeter Foley
Signed-off-by: Peter Foley <pefoley2@verizon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-19nconfig: Silence unused return values from wattrsetStephen Boyd
Ignore the return value from wattrset since we ignore the return value in nconf.gui.c as well. scripts/kconfig/nconf.c: In function 'print_function_line': scripts/kconfig/nconf.c:376: warning: value computed is not used scripts/kconfig/nconf.c:380: warning: value computed is not used scripts/kconfig/nconf.c:387: warning: value computed is not used scripts/kconfig/nconf.c: In function 'show_menu': scripts/kconfig/nconf.c:956: warning: value computed is not used scripts/kconfig/nconf.c:961: warning: value computed is not used scripts/kconfig/nconf.c:963: warning: value computed is not used scripts/kconfig/nconf.c:965: warning: value computed is not used Cc: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-18kconfig: Do not record timestamp in auto.conf and autoconf.hMichal Marek
Timestamps in file data are useless and there is already one in .config Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-15kconfig: get rid of unused flagsYann E. MORIN
Now that we detect recusrion of sourced files, get rid of now unused flags. Regenerate lex.zconf.c_shipped file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-15kconfig: allow multiple inclusion of the same fileYann E. MORIN
Allow 'source'ing the same file from multiple places (eg. from different files, and/or under different conditions). To avoid circular inclusion, scan the source-ancestry of the current file, and abort if already sourced in this branch. Regenerate the pre-parsed lex.zconf.c_shipped file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-04-08kconfig: Avoid buffer underrun in choice inputBen Hutchings
commit 40aee729b350672c2550640622416a855e27938f ('kconfig: fix default value for choice input') fixed some cases where kconfig would select the wrong option from a choice with a single valid option and thus enter an infinite loop. However, this broke the test for user input of the form 'N?', because when kconfig selects the single valid option the input is zero-length and the test will read the byte before the input buffer. If this happens to contain '?' (as it will in a mips build on Debian unstable today) then kconfig again enters an infinite loop. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: stable@kernel.org [2.6.17+] Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-02-08trivial: Fix Steven's Copyright typosUwe Kleine-König
OK, the copyright allows you to write a copy, still I think the lawyers prefer the correct spelling. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> LKML-Reference: <1295899921-11333-1-git-send-email-u.kleine-koenig@pengutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-01-10Merge branch 'kconfig' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: nconf: handle comment entries within choice/endchoice kconfig: fix warning kconfig: Make expr_copy() take a const argument kconfig: simplify select-with-unmet-direct-dependency warning kconfig: add more S_INT and S_HEX consistency checks kconfig: fix `zconfdebug' extern declaration kconfig/conf: merge duplicate switch's case kconfig: fix typos kbuild/gconf: add dummy inline for bind_textdomain_codeset() kbuild/nconf: fix spaces damage kconfig: nuke second argument of conf_write_symbol() kconfig: do not define AUTOCONF_INCLUDED kconfig: the day kconfig warns about "select"-abuse has come
2011-01-07nconf: handle comment entries within choice/endchoicePeter Korsgaard
Equivalent to af6c1598 (kconfig: handle comment entries within choice/endchoice), but for nconfig instead. Implement support for comment entries within choice groups. Comment entries are displayed visually distinct from normal configs, and selecting them is a no-op. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-29kconfig: fix undesirable side effect of adding "visible" menu attributeJan Beulich
This lead to non-selected, non-user-selectable options to be written out to .config. This is not only pointless, but also preventing the user to be prompted should any of those options eventually become visible (e.g. by de-selecting the *_AUTO options the "visible" attribute was added for. Furthermore it is quite logical for the "visible" attribute of a menu to control the visibility of all contained prompts, which is what the patch does. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-27kconfig: fix warningArnaud Lacombe
In file included from scripts/kconfig/zconf.tab.c:2502: scripts/kconfig/expr.c:1033: warning: no previous prototype for 'expr_simplify_unmet_dep' Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>