]> git.baikalelectronics.ru Git - kernel.git/commit
kconfig: fix to tag NEW symbols correctly
authorLi Zefan <lizf@cn.fujitsu.com>
Fri, 7 May 2010 05:57:07 +0000 (13:57 +0800)
committerMichal Marek <mmarek@suse.cz>
Wed, 2 Jun 2010 13:10:32 +0000 (15:10 +0200)
commitb7bfa1f1e2ef5ce5a78ed002f2f4238b65d0456d
tree0adcadfbee2848722c95504c49df7e5f96c562a4
parentaf8d2a59681cc829e0dd4965b60d1caf4a22b94a
kconfig: fix to tag NEW symbols correctly

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>
scripts/kconfig/menu.c