summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kconfig: adapt update-po-config to new UML layoutPaul Bolle2011-12-181-3/+2
| | | | | | | | | | | | | | Commit 5c48b108 ("um: take arch/um/sys-x86 to arch/x86/um") broke the make target update-po-config, as its symlink trick (again) fails. (Previous breakage was fixed with commit bdc69ca4 ("kconfig: change update-po-config to reflect new layout of arch/um").) The new UML layout allows to drop the symlick trick entirely. And if, one day, another architecture supports UML too, that should now work without again breaking this make target. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Michal Marek <mmarek@suse.cz>
* scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputboxCheng Renquan2011-09-091-0/+8
| | | | | | | to make it easier to locate begin/end when editing long strings; Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked By: Nir Tzachar <nir.tzachar@gmail.com>
* scripts/kconfig/nconf: fix editing long stringsCheng Renquan2011-09-091-6/+23
| | | | | | | | | | | | | | The original dialog_inputbox doesn't work with longer than prompt_width strings, here fixed it in this way: 1) add variable cursor_form_win to record cursor of form_win, keep its value always between [0, prompt_width-1]; reuse the original cursor_position as cursor of the string result, use (cursor_position-cursor_form_win) as begin offset to show part of the string in form_win; Signed-off-by: Cheng Renquan <crquan@gmail.com> Cc: Arnaud Lacombe <lacombar@gmail.com> Cc: Nir Tzachar <nir.tzachar@gmail.com>
* scripts/kconfig/nconf: dynamically alloc dialog_input_resultCheng Renquan2011-09-093-17/+26
| | | | | | | | | | To support unlimited length string config items; No check for realloc return value keeps code simple, and to be consistent with other existing unchecked malloc in kconfig. Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* scripts/kconfig/nconf: fix memmove's length argCheng Renquan2011-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case KEY_BACKSPACE / KEY_DC to delete a char, it memmove only (len-cursor_position+1) bytes; the default case is to insert a char, it should also memmove exactly (len-cursor_position+1) bytes; the original use of (len+1) is wrong and may access following memory that doesn't belong to result, may cause SegFault in theory; case KEY_BACKSPACE: if (cursor_position > 0) { memmove(&result[cursor_position-1], &result[cursor_position], len-cursor_position+1); cursor_position--; } break; case KEY_DC: if (cursor_position >= 0 && cursor_position < len) { memmove(&result[cursor_position], &result[cursor_position+1], len-cursor_position+1); } break; default: if ((isgraph(res) || isspace(res)) && len-2 < result_len) { /* insert the char at the proper position */ memmove(&result[cursor_position+1], &result[cursor_position], len-cursor_position+1); result[cursor_position] = res; cursor_position++; } Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked-by: Nir Tzachar <nir.tzachar@gmail.com>
* scripts/kconfig/nconf: fix typo: unknow => unknownCheng Renquan2011-09-091-1/+1
| | | | | Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked-by: Arnaud Lacombe <lacombar@gmail.com>
* Merge branch 'kconfig/for-next' of git://github.com/lacombar/linux-2.6 into ↵Michal Marek2011-08-313-49/+89
|\ | | | | | | kbuild/kconfig
| * kconfig: fix set but not used variablesLucas De Marchi2011-08-301-2/+1
| | | | | | | | | | | | | | | | Some variables were being set but never used, which was triggering warnings in GCC >= 4.6. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * kconfig: handle SIGINT in menuconfigDavidlohr Bueso2011-08-301-34/+52
| | | | | | | | | | | | | | | | | | | | | | I recently got bitten in the ass when pressing Ctrl-C and lost all my current configuration changes. This patch captures SIGINT and allows the user to save any changes. Some code refactoring was made in order to handle the exit behavior. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * kconfig: fix __enabled_ macros definition for invisible and un-selected symbolsArnaud Lacombe2011-08-301-13/+36
| | | | | | | | | | | | | | | | | | | | __enabled_<sym-name> are only generated on visible or selected entries, do not reflect the purpose of its introduction. Fix this by always generating these entries for named symbol. Reported-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* | Merge branch 'master/kconfig-localmodconfig' of ↵Michal Marek2011-08-192-29/+21
|\ \ | | | | | | | | | git://github.com/lacombar/linux-2.6 into kbuild/kconfig
| * | kconfig/streamline_config.pl: merge local{mod,yes}configArnaud Lacombe2011-08-081-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two targets `localmodconfig' and `localyesconfig' only differs from the sed(1) ran on the result of `streamline_config.pl' to convert symbols set to `modules' to `yes'. This conversion can be made directly from the perl script, and thus avoid duplicating the command to generate the configuration. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | kconfig/streamline_config.pl: use options to determine operating modeArnaud Lacombe2011-08-082-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | The options introduced are --localmodconfig (default) and --localyesconfig. They match the Makefile target behavior. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | kconfig/streamline_config.pl: directly access LSMOD from the environmentArnaud Lacombe2011-08-082-12/+8
| |/ | | | | | | | | Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* | 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/nconf: nuke unreferenced `nohelp_text'Arnaud Lacombe2011-08-081-2/+0
|/ | | | | | | | After commit 5416857867c9cc94aba641898c567d9707de30f1, nohelp_text' is no longer referenced, nuke it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* Merge branch 'kconfig' of ↵Linus Torvalds2011-07-3021-259/+323
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (25 commits) kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE() xconfig: Abort close if configuration cannot be saved kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.h kconfig/nconf: remove useless conditionnal kconfig/nconf: prevent segfault on empty menu kconfig/nconf: use the generic menu_get_ext_help() nconfig: Avoid Wunused-but-set warning kconfig/conf: mark xfgets() private kconfig: remove pending prototypes for kconfig_load() kconfig/conf: add command line options' description kconfig/conf: reduce the scope of `defconfig_file' kconfig: use calloc() for expr allocation kconfig: introduce specialized printer kconfig: do not overwrite symbol direct dependency in assignment kconfig/gconf: silent missing prototype warnings kconfig/gconf: kill deadcode kconfig: nuke LKC_DIRECT_LINK cruft kconfig: nuke reference to SWIG kconfig: add missing <stdlib.h> inclusion kconfig: add missing <ctype.h> inclusion ... Fix up conflicts in scripts/kconfig/Makefile
| * kconfig: Introduce IS_ENABLED(), IS_BUILTIN() and IS_MODULE()Michal Marek2011-07-291-57/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * xconfig: Abort close if configuration cannot be savedMichal Marek2011-07-252-4/+11
| | | | | | | | | | | | | | | | 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>
| * kconfig: fix missing "0x" prefix from S_HEX symbol in autoconf.hArnaud Lacombe2011-07-181-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kconfig/nconf: remove useless conditionnalArnaud Lacombe2011-07-131-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kconfig/nconf: prevent segfault on empty menuArnaud Lacombe2011-07-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * kconfig/nconf: use the generic menu_get_ext_help()Arnaud Lacombe2011-07-131-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * nconfig: Avoid Wunused-but-set warningRaghavendra D Prabhu2011-07-131-2/+0
| | | | | | | | | | | | | | | | | | 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>
| * Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into ↵Michal Marek2011-07-043-22/+39
| |\ | | | | | | | | | kbuild/kconfig
| | * kconfig/conf: mark xfgets() privateArnaud Lacombe2011-07-022-7/+3
| | | | | | | | | | | | | | | | | | | | | 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>
| | * kconfig: remove pending prototypes for kconfig_load()Arnaud Lacombe2011-07-021-3/+0
| | | | | | | | | | | | | | | | | | | | | Commit 5a6f8d2bd9e3392569ed6f29ea4d7210652f929b removed `kconfig_load()', however, it missed an hidden prototypes in `lkc.h'. Fix this. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * kconfig/conf: add command line options' descriptionArnaud Lacombe2011-07-021-1/+31
| | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * kconfig/conf: reduce the scope of `defconfig_file'Arnaud Lacombe2011-07-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * kconfig: use calloc() for expr allocationArnaud Lacombe2011-07-021-8/+4
| | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | kconfig: introduce specialized printerArnaud Lacombe2011-07-014-128/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | 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>
| * | Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into ↵Michal Marek2011-06-0819-112/+26
| |\| | | | | | | | | | kbuild/kconfig
| | * kconfig/gconf: silent missing prototype warningsArnaud Lacombe2011-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | | 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>
| | * kconfig/gconf: kill deadcodeArnaud Lacombe2011-06-061-33/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * kconfig: nuke LKC_DIRECT_LINK cruftArnaud Lacombe2011-06-0617-76/+9
| | | | | | | | | | | | | | | | | | | | | 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: nuke reference to SWIGArnaud Lacombe2011-06-061-3/+0
| | | | | | | | | | | | | | | | | | | | | SWIG is not used (yet?) to create kconfig binding, so there is no point referencing it. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * kconfig: add missing <stdlib.h> inclusionArnaud Lacombe2011-06-061-0/+1
| | | | | | | | | | | | | | | | | | This header is needed when using {m,re}alloc(3) and free(3) function family. 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-063-0/+3
| | | | | | | | | | | | | | | | | | This header is needed when using va_{start,end,copy}(3) functions family. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * kconfig: fix return code for invalid boolean symbol in conf_set_sym_val()Arnaud Lacombe2011-06-061-1/+1
| | | | | | | | | | | | | | | Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| | * kconfig: annotate non-trivial fall-troughArnaud Lacombe2011-06-064-0/+11
| | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
| * | Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfigMichal Marek2011-05-251-3/+2
| |\|
| * | kconfig: Only generate config_is_xxx for bool and tristate optionsMichal Marek2011-05-251-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge branch 'kbuild/kconfig-for-40' into kbuild/kconfigMichal Marek2011-05-242-15/+9
| |\ \
| * | | kconfig: autogenerated config_is_xxx macroJean-Christophe PLAGNIOL-VILLARD2011-05-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | kconfig: regen parserArnaud Lacombe2011-06-094-173/+200
| | | | | | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* | | | kconfig: migrate parser to implicit rulesArnaud Lacombe2011-06-093-27/+5
| | | | | | | | | | | | | | | | Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
* | | | kconfig/zconf.l: do not ask to generate backupArnaud Lacombe2011-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the creation of a top-level `lex.backup' when the lexer gets re-generated. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>