summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/menu.c
Commit message (Collapse)AuthorAgeFilesLines
* kbuild: trivial - use tabs for code indent where possibleMasahiro Yamada2014-06-101-3/+3
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: make allnoconfig disable options behind EMBEDDED and EXPERTJosh Triplett2014-04-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | "make allnoconfig" exists to ease testing of minimal configurations. Documentation/SubmitChecklist includes a note to test with allnoconfig. This helps catch missing dependencies on common-but-not-required functionality, which might otherwise go unnoticed. However, allnoconfig still leaves many symbols enabled, because they're hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT. For instance, allnoconfig still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't typically get build-tested with those disabled. To address this, introduce a new Kconfig option "allnoconfig_y", used on symbols which only exist to hide other symbols. Set it on CONFIG_EMBEDDED (which then selects CONFIG_EXPERT). allnoconfig will then disable all the symbols hidden behind those. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* kconfig: fix bug in search results string: use strlen(gstr->s), not gstr->lenMartin Walch2013-10-081-1/+1
| | | | | | | | | | | | | | The struct gstr has a capacity that may differ from the actual string length. However, a string manipulation in the function search_conf made the assumption that it is the same, which led to messing up some search results, especially when the content of the gstr in use had not yet reached at least 63 chars. Signed-off-by: Martin Walch <walch.martin@web.de> Acked-by: Wang YanQing <udknight@gmail.com> Acked-by: Benjamin Poirier <bpoirier@suse.de> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* kconfig: adjust warning message for conflicting typesMartin Walch2013-10-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | Each symbol must have exactly one type assigned. However, if a symbol happens to have two different types assigned at runtime, a warning is printed and the first type is preserved while the second type is being ignored. The warning message says type of <symbol name> redefined from <first type> to <second type> which may be misleading as it may create the impression that the second type replaces the first type. This patch clarifies this by changing the warning to ignoring type redefinition of <symbol name> from <first type> to <second type> Signed-off-by: Martin Walch <walch.martin@web.de> Acked-by: Wang YanQing <udknight@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* kconfig: fix trivial typos and update mconf documentationMartin Walch2013-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This fixes lots of typos in comments and strings. It also updates the documentation strings in mconf to reflect the changes in the user interface from the two commits 6364fd0cb1e4c7f72b974613e0cf5744ae4d2cb2 menuconfig: Add Save/Load buttons 1bdbac478a858d2aa73a6784c7c2e09de0f6d06b menuconfig: Get rid of the top-level entries for "Load an Alternate/Save an Alternate" And it updates the layout of the example search result, i. e. moves down the "Defined at" and "Depends on" lines and adds a symbol state ([=n]) to the symbol in the "Selected by" line. Furthermore, the help texts now should fit in 80 columns again when viewed in mconf. Signed-off-by: Martin Walch <walch.martin@web.de> Reviewed-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Wang YanQing <udknight@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* kconfig: do not allow more than one symbol to have 'option modules'Yann E. MORIN2013-09-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, it was possible to have more than one symbol with the 'option modules' attached to them, although only the last one would in fact control tristates. Since this does not make much sense, only allow at most one symbol to control tristates. Note: it is still possible to have more than one symbol that control tristates, but indirectly: config MOD1 bool "mod1" select MODULES config MOD2 bool "mod2" select MODULES config MODULES bool option modules Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: do not special-case 'MODULES' symbolYann E. MORIN2013-09-051-4/+1
| | | | | | | | | | | | | | | | | | | | | | | Currently, the 'MODULES' symbol is hard-coded to be the default symbol that enables/disables tristates, if no other symbol was declared with 'option modules'. While this used to be needed for the Linux kernel, we now have an explicit 'option modules' attached to the 'MODULES' symbol (since cset 11097a036), so we no longer need to special-case it in the kconfig code. Furthermore, kconfig is extensively used out of the Linux kernel, and other projects may have another meaning for a symbol named 'MODULES'. This patch changes the way we enable/disable tristates: if a symbol was found with 'option modules' attached to it, then that symbol controls enabling tristates. Otherwise, tristates are disabled, even if a symbol named 'MODULES' exists. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Merge branch 'kconfig' of ↵Linus Torvalds2013-07-101-0/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: - dependency solver fix for make defconfig - randconfig fixes, one of which had to be reverted again - more user-friendly sorting of search results - hex and range keywords support longs - fix for [mn]conf not to rely on particular behavior of the LINES and COLS variables - cleanup of magic constants in kconfig/lxdialog - [mn]conf formatting fixes - fix for scripts/config's help text in out-of-tree usage (under a different name) * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: allow "hex" and "range" to support longs Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG kconfig: loop as long as we changed some symbols in randconfig kconfig/[mn]conf: make it explicit in the search box that a regexp is possible kconfig: sort found symbols by relevance kconfig/conf: print the seed used to initialise the RNG for randconfig kconfig/conf: accept a base-16 seed for randconfig kconfig/conf: fix randconfig setting multiple symbols in a choice scripts/config: replace hard-coded script name by a dynamic value mconf/nconf: mark empty menus/menuconfigs different from non-empty ones nconf: use function calls instead of ncurses' variables LINES and COLS mconf: use function calls instead of ncurses' variables LINES and COLS kconfig/lxdialog: handle newline characters in print_autowrap() kconfig/lxdialog: Use new mininimum resize definitions in conf_choice() kconfig/lxdialog: Add definitions for mininimum (re)size values kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on
| * mconf/nconf: mark empty menus/menuconfigs different from non-empty onesDirk Gouders2013-06-181-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submenus are sometimes empty and it would be nice if there is something that notifies us that we should not expect any content _before_ we enter a submenu. A new function menu_is_empty() was introduced and empty menus and menuconfigs are now marked by "----" as opposed to non-empty ones that are marked by "--->". This scheme was suggested by "Yann E. MORIN" <yann.morin.1998@free.fr>. Signed-off-by: Dirk Gouders <dirk@gouders.net> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* | kconfig/menu.c: fix multiple references to expressions in menu_add_prop()Dirk Gouders2013-05-301-1/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | menu_add_prop() applies upper menus' visibilities to actual prompts by AND-ing the prompts visibilities with the upper menus ones. This creates a further reference to the menu's visibilities and when the expression reduction functions do their work, they may remove or modify expressions that have multiple references, thus causing unpredictable side-effects. The following example Kconfig constructs a case where this causes problems: a menu and a prompt which's visibilities depend on the same symbol. When invoking mconf with this Kconfig and pressing "Z" we see a problem caused by a free'd expression still referenced by the menu's visibility: ------------------------------------------------------------------------ mainmenu "Kconfig Testing Configuration" config VISIBLE def_bool n config Placeholder bool "Place holder" menu "Invisible" visible if VISIBLE config TEST_VAR bool "Test option" if VISIBLE endmenu ------------------------------------------------------------------------ This patch fixes this problem by creating copies of the menu's visibility expressions before AND-ing them with the prompt's one. Signed-off-by: Dirk Gouders <dirk@gouders.net> [yann.morin.1998@free.fr: move variable into its block-scope, keep lines <80 chars, typo] Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
* menuconfig: fix NULL pointer dereference when searching a symbolLi Zefan2013-05-071-6/+10
| | | | | | | | | | | | | | | | | | | | | | | Searching for PPC_EFIKA results in a segmentation fault, and it's because get_symbol_prop() returns NULL. In this case CONFIG_PPC_EFIKA is defined in arch/powerpc/platforms/ 52xx/Kconfig, so it won't be parsed if ARCH!=PPC, but menuconfig knows this symbol when it parses sound/soc/fsl/Kconfig: config SND_MPC52xx_SOC_EFIKA tristate "SoC AC97 Audio support for bbplan Efika and STAC9766" depends on PPC_EFIKA This bug was introduced by commit bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts"). Reported-and-tested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Li Zefan <lizefan@huawei.com> Tested-by: Libo Chen <libo.chen@huawei.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* menuconfig: print more info for symbol without promptsWengmeiling2013-04-301-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When we search a config symbol, if it has no prompt the position of this symbol in the Kconfig file and it's dependencies are not printed. This can be inconvenient, especially when it's set to n and we want to find out why. the following is an example: before: Symbol: GENERIC_SMP_IDLE_THREAD [=y] Type : boolean Selected by: X86 [=y] after: Symbol: GENERIC_SMP_IDLE_THREAD [=y] Type : boolean Defined at arch/Kconfig:213 Selected by: X86 [=y] Signed-off-by: Weng Meiling <wengmeiling.weng@huawei.com> Signed-off-by: Libo Chen <libo.chen@huawei.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'kbuild/rc-fixes' into kbuild/kconfigMichal Marek2013-02-251-6/+8
|\ | | | | | | | | There is one kconfig fix in the rc-fixes branch that I forgot to submit for 3.8, so let's add it to the kconfig branch for 3.9-rc1.
| * menuconfig: Replace CIRCLEQ by list_head-style lists.Benjamin Poirier2012-10-251-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | sys/queue.h and CIRCLEQ in particular have proven to cause portability problems (reported on Debian Sarge, Cygwin and FreeBSD) Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Benjamin Poirier <bpoirier@suse.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | kconfig: Fix malloc handling in conf toolsAlan Cox2012-11-201-2/+2
|/ | | | | | | (and get them out of the noise in the audit work) Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* menuconfig: Assign jump keys per-page instead of globallyBenjamin Poirier2012-09-271-26/+28
| | | | | | | | | At the moment, keys 1-9 are assigned to the first 9 search results. This patch makes them assigned to the first 9 results per-page instead. We are much less likely to run out of keys that way. Signed-off-by: Benjamin Poirier <bpoirier@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
* menuconfig: Add jump keys to search resultsBenjamin Poirier2012-09-271-11/+44
| | | | | | | | | | | makes it possible to jump directly to the menu for a configuration entry after having searched for it with '/'. If this menu is not currently accessible we jump to the nearest accessible parent instead. After exiting this menu, the user is returned to the search results where he may jump further in or elsewhere. Signed-off-by: Benjamin Poirier <bpoirier@suse.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: factor code in menu_get_ext_help()Arnaud Lacombe2011-08-081-6/+4
| | | | | | Cc: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kbuild: Fix help text not displayed in choice option.Srinivas Kandagatla2011-08-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Help text under choice menu is never displayed because it does not have symbol name associated with it, however many kconfigs have help text under choice, assuming that it will be displayed when user selects help. for example in Kconfig if we have: choice prompt "Choice" ---help--- HELP TEXT ... config A bool "A" config B bool "B" endchoice Without this patch "HELP TEXT" is not displayed when user selects help option when "Choice" is highlighted from menuconfig or xconfig or gconfig. This patch changes the logic in menu_get_ext_help to display help for cases which dont have symbol names like choice. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Reviewed-by: Stuart Menefy <stuart.menefy@st.com> Reviewed-by: Arnaud Lacombe <lacombar@gmail.com> Cc: stable@kernel.org Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: do not overwrite symbol direct dependency in assignmentArnaud Lacombe2011-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* kconfig: nuke LKC_DIRECT_LINK cruftArnaud Lacombe2011-06-061-1/+0
| | | | | | | 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>
* kconfig: add missing <ctype.h> inclusionArnaud Lacombe2011-06-061-0/+1
| | | | | | This header is needed when using isspace(3) function family. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* kconfig: add missing <stdarg.h> inclusionArnaud Lacombe2011-06-061-0/+1
| | | | | | This header is needed when using va_{start,end,copy}(3) functions family. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* Merge branch 'kconfig' of ↵Linus Torvalds2011-01-101-3/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * kconfig: add more S_INT and S_HEX consistency checksArnaud Lacombe2010-12-151-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add more number consistency checkg, trying to catch the following situation: config FOO0 hex default 42 config FOO1 string config BAR0 int default FOO1 config BAR1 hex default FOO1 config FOO2 hex default 42h config FOO3 int default "1bar" Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | kconfig: fix undesirable side effect of adding "visible" menu attributeJan Beulich2010-12-291-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | kconfig: add an option to determine a menu's visibilityArnaud Lacombe2010-11-221-0/+11
|/ | | | | | | | | | This option is aimed to add the possibility to control a menu's visibility without adding dependency to the expression to all the submenu. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Merge branch 'kbuild/rc-fixes' into kbuild/kconfigMichal Marek2010-10-121-5/+2
|\ | | | | | | We need to revert the temporary hack in 71ebc01, hence the merge.
| * kconfig: delay symbol direct dependency initializationArnaud Lacombe2010-10-041-5/+2
| | | | | | | | | | | | | | | | | | This fixes the use-after-free and associated crash in kconfig introduced in commit 246cf9c26bf11f2bffbecea6e5bd222eee7b1df8. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* | kconfig: don't emit warning upon rootmenu's prompt redefinitionArnaud Lacombe2010-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | This silences the warning printed upon prompt redefinition for the rootmenu. We will encounter this redefinition when a "mainmenu" statement is specified and override the default prompt. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
* | kconfig: rephrase help texts/comments not to include the package nameArnaud Lacombe2010-09-191-1/+1
| | | | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Randy Dunlap <rdunlap@xenotime.net> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
* | kconfig: allow build-time definition of the internal config prefixArnaud Lacombe2010-09-191-1/+1
|/ | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Michal Marek <mmarek@suse.cz>
* kconfig: save location of config symbolsSam Ravnborg2010-08-031-0/+2
| | | | | | | | | | | | | | | When we add a new config symbol save the file/line so we later can refer to their location. The information is saved as a property to a config symbol because we may have multiple definitions of the same symbol. This has the side-effect that a symbol always has at least one property. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kbuild: Warn on selecting symbols with unmet direct dependenciesCatalin Marinas2010-07-021-0/+5
| | | | | | | | | | | | | | | | | | | The "select" statement in Kconfig files allows the enabling of options even if they have unmet direct dependencies (i.e. "depends on" expands to "no"). Currently, the "depends on" clauses are used in calculating the visibility but they do not affect the reverse dependencies in any way. The patch introduces additional tracking of the "depends on" statements and prints a warning on selecting an option if its direct dependencies are not met. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: fix to tag NEW symbols correctlyLi Zefan2010-06-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those configs are not new: $ cat .config ... CONFIG_NAMESPACES=y ... CONFIG_BLOCK=y ... But are tagged as NEW: $ yes "" | make config > myconf $ cat myconf | grep '(NEW)' Namespaces support (NAMESPACES) [Y/?] (NEW) y ... Enable the block layer (BLOCK) [Y/?] (NEW) y ... You can also notice this bug when using gconfig/xconfig. It's because the SYMBOL_DEF_USER bit of an invisible symbol is cleared when the config file is read: int conf_read(const char *name) { ... for_all_symbols(i, sym) { if (sym_has_value(sym) && !sym_is_choice_value(sym)) { /* Reset values of generates values, so they'll appear * as new, if they should become visible, but that * doesn't quite work if the Kconfig and the saved * configuration disagree. */ if (sym->visible == no && !conf_unsaved) sym->flags &= ~SYMBOL_DEF_USER; ... } But a menu item which represents an invisible symbol is still visible, if it's sub-menu is visible, so its SYMBOL_DEF_USER bit should be set to indicate it's not NEW. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: print the range of integer/hex symbol in help textLi Zefan2010-06-021-0/+8
| | | | | | | | | | | | | | | | | Without this patch, one has to refer to the Kconfig file to find out the range of an integer/hex symbol. │ Symbol: NR_CPUS [=4] │ Type : integer │ Range : [2 8] │ Prompt: Maximum number of CPUs │ Defined at arch/x86/Kconfig:761 │ Depends on: SMP [=y] && !MAXSMP [=n] │ Location: │ -> Processor type and features Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: print symbol type in help textLi Zefan2010-06-021-1/+3
| | | | | | | | | | | | | | | | | Randy suggested to print out the symbol type in gconfig. Note this change does more than Randy's suggestion, that it also affects menuconfig and "make config". │ Symbol: BLOCK [=y] │ Type : boolean │ Prompt: Enable the block layer │ Defined at block/Kconfig:4 │ Depends on: EMBEDDED [=n] Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* menuconfig: add support to show hidden options which have promptsLi Zefan2010-04-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: Press <Z> to show all config symbols which have prompts. Quote Tim Bird: | I've been bitten by this numerous times. I most often | use ftrace on ARM, but when I go back to x86, I almost | always go through a sequence of searching for the | function graph tracer in the menus, then realizing it's | completely missing until I disable CC_OPTIMIZE_FOR_SIZE. | | Is there any way to have the menu item appear, but be | unsettable unless the SIZE option is disabled? I'm | not a Kconfig guru... I myself found this useful too. For example, I need to test ftrace/tracing and want to be sure all the tracing features are enabled, so I enter the "Tracers" menu, and press <Z> to see if there is any config hidden. I also noticed gconfig and xconfig have a button "Show all options", but that's a bit too much, and I think normally what we are not interested in those configs which have no prompt thus can't be changed by users. Exmaple: --- Tracers -*- Kernel Function Tracer - - Kernel Function Graph Tracer [*] Interrupts-off Latency Tracer - - Preemption-off Latency Tracer [*] Sysprof Tracer Here you can see 2 tracers are not selectable, and then can find out how to make them selectable. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: some small fixesLi Zefan2010-04-141-1/+1
| | | | | | | | | - fix a typo in documentation - fix a typo in a printk on error - fix comments in dialog_inputbox() Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kconfig: new configuration interface (nconfig)nir.tzachar@gmail.com2010-02-021-1/+15
| | | | | | | | | | | | | This patch was inspired by the kernel projects page, where an ncurses replacement for menuconfig was mentioned (by Sam Ravnborg). Building on menuconfig, this patch implements a more modern look interface using ncurses and ncurses' satellite libraries (menu, panel, form). The implementation does not depend on lxdialog, which is currently distributed with the kernel. Signed-off-by: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* kbuild: add static to prototypesTrevor Keith2009-09-201-2/+2
| | | | | | | | | Warnings found via gcc -Wmissing-prototypes. Signed-off-by: Trevor Keith <tsrk@tsrk.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: make use of menu_get_ext_help in gconfigCheng Renquan2009-09-201-1/+2
| | | | | | | | | Futhermore, gconfig interface lack the "search a symbol" function, do later. Signed-off-by: Cheng Renquan <crquan@gmail.com> Cc: Roman Zippel <zippel@linux-m68k.org> [sam: fix SEGV in gconfig] Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: add menu_get_ext_help function to display more informationCheng Renquan2009-09-201-0/+79
| | | | | | | | | | | | | The three functions are moved from mconf.c, then they can be shared in all menuconfig & gconfig & xconfig & config. +void menu_get_ext_help(struct menu *menu, struct gstr *help) +static void get_prompt_str(struct gstr *r, struct property *prop) +void get_symbol_str(struct gstr *r, struct symbol *sym) Signed-off-by: Cheng Renquan <crquan@gmail.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: add named choice groupRoman Zippel2008-04-281-37/+27
| | | | | | | | | | | | As choice dependency are now fully checked, it's quite easy to add support for named choices. This lifts the restriction that a choice value can only appear once, although it still has to be within the same group, but multiple choices can be joined by giving them a name. While at it I cleaned up a little the choice type logic to simplify it a bit. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: ignore select of unknown symbolSam Ravnborg2008-02-031-6/+3
| | | | | | | | | | | | | | | We have had warnings for a long time about select of unknow symbol but the warnings does not really makes sense since we may select a symbol that is relevant and defined in one arch but not in another arch. And as long as we do not use a common set of Kconfig files for all archs lets just ignore this case. Previously we have used this to find bad uses of select but we need a more relaible method to do so. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
* kconfig: tristate choices with mixed tristate and boolean valuesJan Beulich2008-01-281-3/+35
| | | | | | | | | | | | | | | Change kconfig behavior so that mixing bool and tristate config settings in a choice is possible and has the desired effect of offering just the tristate options individually if the choice gets set to M, and a normal boolean selection if the choice gets set to Y. Also fix scripts/kconfig/conf's handling of children of choice values - there may be more than one immediate child, and all of them need to be processed. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: "Roman Zippel" <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: environment symbol supportRoman Zippel2008-01-281-1/+4
| | | | | | | | | | Add the possibility to import a value from the environment into kconfig via the option syntax. Beside flexibility this has the advantage providing proper dependencies. Documented the options syntax. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: explicitly introduce expression listRoman Zippel2008-01-281-1/+1
| | | | | | | | | Rename E_CHOICE to E_LIST to explicitly add support for expression lists. Add a helper macro expr_list_for_each_sym to more easily iterate over the list. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
* kconfig: macro fix in menu.cEGRY Gabor2008-01-281-2/+2
| | | | | | | | This patch removes the indirect I18N support for config file. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
* Revert "kconfig: tristate choices with mixed tristate and boolean values"Linus Torvalds2007-10-191-26/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5bf3d891a6a0fb5aa122792d965e3774108b923. David Brownell notes that this causes a regression visible in the drivers/usb/gadget Kconfig file: "That Kconfig hasn't changed (other than adding new drivers), and it's worked that way for several years now ... so the issue seems to be changes in menuconfig/kconfig/etc semantics. The issue is that when USB_GADGET=m, it's no longer possible to configure peripheral controller drivers as modules ... the controller drivers can now only be configured for static linkage. It should be making a choice of one of the controller drivers which could work on the target system, and allow that driver to be linked either as a module (ok iff USB_GADGET=m) or statically." Reverting this commit resolves the problem, and also fixes a second problem that David noticed: various dependent options couldn't be enabled. Tested-and-reported-by: David Brownell <david-b@pacbell.net> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Jan Beulich <jbeulich@novell.com>, Cc: Andrew Morton <akpm@linux-foundation.org>, Cc: Sam Ravnborg <sam@ravnborg.org>, Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud