Skip to content
  1. Mar 21, 2018
  2. Feb 20, 2018
  3. Feb 18, 2018
  4. Feb 15, 2018
  5. Feb 13, 2018
  6. Feb 10, 2018
  7. Feb 08, 2018
    • Masahiro Yamada's avatar
      kconfig: send error messages to stderr · 9e3e10c7
      Masahiro Yamada authored
      
      
      These messages should be directed to stderr.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      9e3e10c7
    • Masahiro Yamada's avatar
      kconfig: echo stdin to stdout if either is redirected · f3ff6fb5
      Masahiro Yamada authored
      
      
      If stdio is not tty, conf_askvalue() puts additional new line to
      prevent prompts from being concatenated into a single line.  This
      care is missing in conf_choice(), so a 'choice' prompt and the next
      prompt are shown in the same line.
      
      Move the code into xfgets() to cater to all cases.  To improve this
      more, let's echo stdin to stdout.  This clarifies what keys were
      input from stdio and the stdout looks like as if it were from tty.
      
      I removed the isatty(2) check since stderr is unrelated here.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      f3ff6fb5
    • Masahiro Yamada's avatar
      kconfig: remove check_stdin() · d2a04648
      Masahiro Yamada authored
      
      
      Except silentoldconfig, valid_stdin is 1, so check_stdin() is no-op.
      
      oldconfig and silentoldconfig work almost in the same way except that
      the latter generates additional files under include/.  Both ask users
      for input for new symbols.
      
      I do not know why only silentoldconfig requires stdio be tty.
      
        $ rm -f .config; touch .config
        $ yes "" | make oldconfig > stdout
        $ rm -f .config; touch .config
        $ yes "" | make silentoldconfig > stdout
        make[1]: *** [silentoldconfig] Error 1
        make: *** [silentoldconfig] Error 2
        $ tail -n 4 stdout
        Console input/output is redirected. Run 'make oldconfig' to update configuration.
      
        scripts/kconfig/Makefile:40: recipe for target 'silentoldconfig' failed
        Makefile:507: recipe for target 'silentoldconfig' failed
      
      Redirection is useful, for example, for testing where we want to give
      particular key inputs from a test file, then check the result.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      d2a04648
    • Masahiro Yamada's avatar
      kconfig: remove 'config*' pattern from .gitignnore · cd58a91d
      Masahiro Yamada authored
      
      
      I could not figure out why this pattern should be ignored.
      Checking commit 1e65174a ("Add some basic .gitignore files")
      did not help.
      
      Let's remove this pattern, then see if it is really needed.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      cd58a91d
    • Masahiro Yamada's avatar
      kconfig: show '?' prompt even if no help text is available · 4f208f39
      Masahiro Yamada authored
      
      
      'make config', 'make oldconfig', etc. always receive '?' as a valid
      input and show useful information even if no help text is available.
      
      ------------------------>8------------------------
      foo (FOO) [N/y] (NEW) ?
      
      There is no help available for this option.
      Symbol: FOO [=n]
      Type  : bool
      Prompt: foo
        Defined at Kconfig:1
      ------------------------>8------------------------
      
      However, '?' is not shown in the prompt if its help text is missing.
      Let's show '?' all the time so that the prompt and the behavior match.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      4f208f39
    • Masahiro Yamada's avatar
      kconfig: do not write choice values when their dependency becomes n · cb67ab2c
      Masahiro Yamada authored
      
      
      "# CONFIG_... is not set" for choice values are wrongly written into
      the .config file if they are once visible, then become invisible later.
      
        Test case
        ---------
      
      ---------------------------(Kconfig)----------------------------
      config A
      	bool "A"
      
      choice
      	prompt "Choice ?"
      	depends on A
      
      config CHOICE_B
      	bool "Choice B"
      
      config CHOICE_C
      	bool "Choice C"
      
      endchoice
      ----------------------------------------------------------------
      
      ---------------------------(.config)----------------------------
      CONFIG_A=y
      ----------------------------------------------------------------
      
      With the Kconfig and .config above,
      
        $ make config
        scripts/kconfig/conf  --oldaskconfig Kconfig
        *
        * Linux Kernel Configuration
        *
        A (A) [Y/n] n
        #
        # configuration written to .config
        #
        $ cat .config
        #
        # Automatically generated file; DO NOT EDIT.
        # Linux Kernel Configuration
        #
        # CONFIG_A is not set
        # CONFIG_CHOICE_B is not set
        # CONFIG_CHOICE_C is not set
      
      Here,
      
        # CONFIG_CHOICE_B is not set
        # CONFIG_CHOICE_C is not set
      
      should not be written into the .config file because their dependency
      "depends on A" is unmet.
      
      Currently, there is no code that clears SYMBOL_WRITE of choice values.
      
      Clear SYMBOL_WRITE for all symbols in sym_calc_value(), then set it
      again after calculating visibility.  To simplify the logic, set the
      flag if they have non-n visibility, regardless of types, and regardless
      of whether they are choice values or not.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarUlf Magnusson <ulfalizer@gmail.com>
      cb67ab2c
  8. Feb 07, 2018
  9. Feb 06, 2018
  10. Feb 02, 2018
  11. Feb 01, 2018
Loading