03 Sep, 2020

1 commit


10 Jan, 2020

1 commit

  • strncasecmp() & strcasecmp() functions are declared in strings.h, not
    string.h. On most environments the former is implicitly included by
    the latter but on some setups, building menuconfig results in the
    following warning:

    HOSTCC scripts/kconfig/mconf.o
    scripts/kconfig/mconf.c: In function ‘search_conf’:
    scripts/kconfig/mconf.c:423:6: warning: implicit declaration of function ‘strncasecmp’ [-Wimplicit-function-declaration]
    if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
    ^~~~~~~~~~~
    scripts/kconfig/mconf.c: In function ‘main’:
    scripts/kconfig/mconf.c:1021:8: warning: implicit declaration of function ‘strcasecmp’ [-Wimplicit-function-declaration]
    if (!strcasecmp(mode, "single_menu"))
    ^~~~~~~~~~

    Fix it by explicitly including strings.h.

    Signed-off-by: Bartosz Golaszewski
    Signed-off-by: Masahiro Yamada

    Bartosz Golaszewski
     

06 Jul, 2019

1 commit


11 May, 2019

1 commit

  • With menuconfig / nconfig, users can input any file path from the
    "Save" menu, but it fails if the parent directory does not exist.

    Why not create the parent directory automatically. I think this is
    a user-friendly behavior.

    I changed the error messages in menuconfig / nconfig.

    "Nonexistent directory" is no longer the most likely reason of the
    failure. Perhaps, the user specified the existing directory, or
    attempted to write to the location without write permission.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

29 Mar, 2019

1 commit

  • Backspace is not working on some terminal emulators which do not send the
    key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127).
    But currently only '^?' is handled. Let's also handle '^H' for those
    terminals.

    Signed-off-by: Changbin Du
    Signed-off-by: Masahiro Yamada

    Changbin Du
     

28 Dec, 2018

1 commit

  • All files in lxdialog/ are licensed under GPL-2.0+, and the rest are
    under GPL-2.0. I added GPL-2.0 tags to test scripts in tests/.

    Documentation/process/license-rules.rst does not suggest anything
    about the flex/bison files. Because flex does not accept the C++
    comment style at the very top of a file, I used the C style for
    zconf.l, and so for zconf.y for consistency.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

25 Jul, 2018

2 commits

  • Currently, only syncconfig creates or updates include/config/auto.conf
    and some other files. Other config targets create or update only the
    .config file.

    When you configure and build the kernel from a pristine source tree,
    any config target is followed by syncconfig in the build stage since
    include/config/auto.conf is missing.

    We are moving compiler tests from Makefile to Kconfig. It means that
    parsing Kconfig files will be more costly since Kconfig invokes the
    compiler commands internally. Thus, we want to avoid invoking Kconfig
    twice (one for *config to create the .config, and one for syncconfig
    to synchronize the auto.conf). If auto.conf does not exist, we can
    generate all configuration files in the first configuration stage,
    which will save the syncconfig in the build stage.

    Please note this should be done only when auto.conf is missing. If
    *config blindly did this, time stamp files under include/config/ would
    be unnecessarily touched, triggering unneeded rebuild of objects.

    I assume a scenario like this:

    1. You have a source tree that has already been built
    with CONFIG_FOO disabled

    2. Run "make menuconfig" to enable CONFIG_FOO

    3. CONFIG_FOO turns out to be unnecessary.
    Run "make menuconfig" again to disable CONFIG_FOO

    4. Run "make"

    In this case, include/config/foo.h should not be touched since there
    is no change in CONFIG_FOO. The sync process should be delayed until
    the user really attempts to build the kernel.

    This commit has another motivation; I want to suppress the 'No such
    file or directory' warning from the 'include' directive.

    The top-level Makefile includes auto.conf with '-include' directive,
    like this:

    ifeq ($(dot-config),1)
    -include include/config/auto.conf
    endif

    This looks strange because auto.conf is mandatory when dot-config is 1.
    I guess only the reason of using '-include' is to suppress the warning
    'include/config/auto.conf: No such file or directory' when building
    from a clean tree. However, this has a side-effect; Make considers
    the files included by '-include' are optional. Hence, Make continues
    to build even if it fails to generate include/config/auto.conf. I will
    change this in the next commit, but the warning message is annoying.
    (At least, kbuild test robot reports it as a regression.)

    With this commit, Kconfig will generate all configuration files together
    with the .config and I guess it is a solution good enough to suppress
    the warning.

    Note:
    GNU Make 4.2 or later does not display the warning from the 'include'
    directive if include files are successfully generated. See GNU Make
    commit 87a5f98d248f ("[SV 102] Don't show unnecessary include file
    errors.") However, older GNU Make versions are still widely used.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • As you see in mconf.c and nconf.c, conf_message_callback() hooks are
    likely to end up with the boilerplate of vsnprintf(). Process the
    string format before calling conf_message_callback() so that it
    receives a simple string.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Dirk Gouders

    Masahiro Yamada
     

28 May, 2018

1 commit

  • The localization support is broken and appears unused.
    There is no google hits on the update-po-config target.
    And there is no recent (5 years) activity related to the localization.

    So lets just drop this as it is no longer used.

    Suggested-by: Ulf Magnusson
    Suggested-by: Masahiro Yamada
    Signed-off-by: Sam Ravnborg
    Signed-off-by: Masahiro Yamada

    Sam Ravnborg
     

23 Jun, 2017

1 commit

  • Fix sparse warnings in scripts/kconfig/nconf* ('make nconfig'):

    ../scripts/kconfig/nconf.c:1071:32: warning: Using plain integer as NULL pointer
    ../scripts/kconfig/nconf.c:1238:30: warning: Using plain integer as NULL pointer
    ../scripts/kconfig/nconf.c:511:51: warning: Using plain integer as NULL pointer
    ../scripts/kconfig/nconf.c:1460:6: warning: symbol 'setup_windows' was not declared. Should it be static?
    ../scripts/kconfig/nconf.c:274:12: warning: symbol 'current_instructions' was not declared. Should it be static?
    ../scripts/kconfig/nconf.c:308:22: warning: symbol 'function_keys' was not declared. Should it be static?
    ../scripts/kconfig/nconf.gui.c:132:17: warning: non-ANSI function declaration of function 'set_colors'
    ../scripts/kconfig/nconf.gui.c:195:24: warning: Using plain integer as NULL pointer

    nconf.gui.o before/after files are the same.
    nconf.o before/after files are the same until the 'static' function
    declarations are added.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Masahiro Yamada

    Randy Dunlap
     

29 Nov, 2016

1 commit


09 Apr, 2015

1 commit


10 Jun, 2014

1 commit


17 Jul, 2013

1 commit


25 Jun, 2013

1 commit


19 Jun, 2013

2 commits

  • 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" .

    Signed-off-by: Dirk Gouders
    Tested-by: "Yann E. MORIN"
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Dirk Gouders
     
  • According to the documentation [1], LINES and COLS are initialized by
    initscr(); it does not say anything about the behavior when windows are
    resized.

    Do not rely on the current implementation of ncurses that updates
    these variables on resize, but use the propper function calls or macros
    to get window dimensions.

    The use of the variables in main() was OK, but for the sake of
    consistency it was modified to use the macro getmaxyx().

    [1] ncurses(3X)

    Signed-off-by: Dirk Gouders
    Reviewed-by: "Yann E. MORIN"
    [yann.morin.1998@free.fr: declare 'lines' and 'columns' on a single line]
    Signed-off-by: Yann E. MORIN

    Dirk Gouders
     

09 Feb, 2013

2 commits

  • >From: Roland Eggner

    More reasonable labels of function keys line. Rename labels and keep menu
    width, as required for fitting on COLUMNS=80 terminals:
    • s/Insts/Help 2/
    • s/Config/ShowAll/

    Signed-off-by: Roland Eggner
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Roland Eggner
     
  • >From: Roland Eggner

    Rewrite all help texts. During several years lazy (incomplete) updates have
    left behind a rather thick layer of dust. Intentions:
    (1) Global help called by should document all _currently_ implemented
    keybindings.
    (2) Different help texts called by resp. should be consistent
    with (1) and with implementation:
    • on plain menu entry
    • in radiolist window
    • in input windows for text, decimal or hexadecimal values
    • in filename selection windows
    • SymSearch specific help called by followed by
    (3) More reasonable window titles:
    Rename window title s/README/Global help/
    Rename variable s/nconf_readme/nconf_global_help/
    Rename window title s/Instructions/Short help/
    (4) Consider which hints are most useful for first-time-users.

    Signed-off-by: Roland Eggner
    Reviewed-by: "Yann E. MORIN"
    [yann.morin.1998@free.fr: a few additional fixes]
    Signed-off-by: "Yann E. MORIN"

    Roland Eggner
     

20 Nov, 2012

2 commits

  • Currently, the CONFIG_ prefix is hard-coded in the kconfig frontends
    executables. This means that two projects that use kconfig with
    different prefixes can not share the same kconfig frontends.

    Instead of hard-coding the prefix in the frontends, get it from the
    environment, and revert back to hard-coded value if not found.

    Signed-off-by: "Yann E. MORIN"
    Signed-off-by: Michal Marek

    Yann E. MORIN
     
  • Having the CONFIG_ prefix in string constants gets in the way of
    using a run-time-defined CONFIG_ prefix.

    Fix that by using temp growable strings (gstr) in which we printf
    the text.

    Signed-off-by: "Yann E. MORIN"
    Signed-off-by: Michal Marek

    Yann E. MORIN
     

28 Sep, 2012

1 commit

  • 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
    Signed-off-by: Michal Marek

    Benjamin Poirier
     

26 Jul, 2012

1 commit


05 Jul, 2012

1 commit


18 May, 2012

1 commit

  • Hardware with MCA bus is limited to 386 and 486 class machines
    that are now 20+ years old and typically with less than 32MB
    of memory. A quick search on the internet, and you see that
    even the MCA hobbyist/enthusiast community has lost interest
    in the early 2000 era and never really even moved ahead from
    the 2.4 kernels to the 2.6 series.

    This deletes anything remaining related to CONFIG_MCA from core
    kernel code and from the x86 architecture. There is no point in
    carrying this any further into the future.

    One complication to watch for is inadvertently scooping up
    stuff relating to machine check, since there is overlap in
    the TLA name space (e.g. arch/x86/boot/mca.c).

    Cc: Thomas Gleixner
    Cc: James Bottomley
    Cc: x86@kernel.org
    Acked-by: Ingo Molnar
    Acked-by: H. Peter Anvin
    Signed-off-by: Paul Gortmaker

    Paul Gortmaker
     

09 Sep, 2011

1 commit


08 Aug, 2011

1 commit


13 Jul, 2011

4 commits

  • After the test

    if (!submenu || ...)
    continue;

    the variable `submenu' can _not_ be NULL, so do not test for this
    situation.

    Cc: Nir Tzachar
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • nconf does not check the validity of the current menu when help is
    requested (with either , '?' 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
    Cc: Andrej Gelenberg
    Reported-by: Andrej Gelenberg
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    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
    Cc: Andrej Gelenberg
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     
  • 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
    Acked-by: WANG Cong
    Signed-off-by: Michal Marek

    Raghavendra D Prabhu
     

07 Jun, 2011

1 commit


19 Apr, 2011

1 commit

  • 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
    Signed-off-by: Stephen Boyd
    Signed-off-by: Michal Marek

    Stephen Boyd
     

07 Jan, 2011

1 commit

  • 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
    Signed-off-by: Michal Marek

    Peter Korsgaard
     

15 Dec, 2010

1 commit


28 Oct, 2010

1 commit


28 Sep, 2010

1 commit

  • …nux-2.6 into kbuild/kconfig

    * 'kbuild/kconfig/kbuild-generic-v7' of http://github.com/lacombar/linux-2.6:
    kbuild: migrate all arch to the kconfig mainmenu upgrade
    kconfig: expand file names
    kconfig: use the file's name of sourced file
    kconfig: constify file name
    kconfig: don't emit warning upon rootmenu's prompt redefinition
    kconfig: replace KERNELVERSION usage by the mainmenu's prompt
    kconfig: delay gconf window initialization
    kconfig: expand by default the rootmenu's prompt
    kconfig: add a symbol string expansion helper
    kconfig: regen parser
    kconfig: implement the `mainmenu' directive
    kconfig: allow PACKAGE to be defined on the compiler's command-line
    kconfig: rephrase help texts/comments not to include the package name
    kconfig: allow build-time definition of the internal config prefix
    kconfig: rephrase help text not to mention the internal prefix
    kconfig: replace a `switch()' statement by a more flexible `if()' statement

    Michal Marek
     

20 Sep, 2010

3 commits