kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE
Over time, the use of the flag SYMBOL_AUTO changed from initially marking three automatically generated symbols ARCH, KERNELRELEASE and UNAME_RELEASE to today's effect of protecting symbols from being written out. Currently, only symbols of type CHOICE and those with option defconf_list set have that flag set. Reflect that change in semantics in the flag's name. Signed-off-by: Dirk Gouders <dirk@gouders.net> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
4ab3b80159
commit
693359f7ac
|
@ -397,7 +397,7 @@ int conf_read(const char *name)
|
|||
|
||||
for_all_symbols(i, sym) {
|
||||
sym_calc_value(sym);
|
||||
if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO))
|
||||
if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE))
|
||||
continue;
|
||||
if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
|
||||
/* check that calculated value agrees with saved value */
|
||||
|
@ -832,7 +832,7 @@ static int conf_split_config(void)
|
|||
res = 0;
|
||||
for_all_symbols(i, sym) {
|
||||
sym_calc_value(sym);
|
||||
if ((sym->flags & SYMBOL_AUTO) || !sym->name)
|
||||
if ((sym->flags & SYMBOL_NO_WRITE) || !sym->name)
|
||||
continue;
|
||||
if (sym->flags & SYMBOL_WRITE) {
|
||||
if (sym->flags & SYMBOL_DEF_AUTO) {
|
||||
|
|
|
@ -141,7 +141,7 @@ struct symbol {
|
|||
#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */
|
||||
#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
|
||||
#define SYMBOL_CHANGED 0x0400 /* ? */
|
||||
#define SYMBOL_AUTO 0x1000 /* value from environment variable */
|
||||
#define SYMBOL_NO_WRITE 0x1000 /* Symbol for internal use only; it will not be written */
|
||||
#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
|
||||
#define SYMBOL_WARNED 0x8000 /* warning has been issued */
|
||||
|
||||
|
|
|
@ -101,8 +101,8 @@ const char *dbg_sym_flags(int val)
|
|||
strcat(buf, "write/");
|
||||
if (val & SYMBOL_CHANGED)
|
||||
strcat(buf, "changed/");
|
||||
if (val & SYMBOL_AUTO)
|
||||
strcat(buf, "auto/");
|
||||
if (val & SYMBOL_NO_WRITE)
|
||||
strcat(buf, "no_write/");
|
||||
|
||||
buf[strlen(buf) - 1] = '\0';
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ void menu_add_option(int token, char *arg)
|
|||
sym_defconfig_list = current_entry->sym;
|
||||
else if (sym_defconfig_list != current_entry->sym)
|
||||
zconf_error("trying to redefine defconfig symbol");
|
||||
sym_defconfig_list->flags |= SYMBOL_AUTO;
|
||||
sym_defconfig_list->flags |= SYMBOL_NO_WRITE;
|
||||
break;
|
||||
case T_OPT_ALLNOCONFIG_Y:
|
||||
current_entry->sym->flags |= SYMBOL_ALLNOCONFIG_Y;
|
||||
|
|
|
@ -463,7 +463,7 @@ void sym_calc_value(struct symbol *sym)
|
|||
}
|
||||
}
|
||||
|
||||
if (sym->flags & SYMBOL_AUTO)
|
||||
if (sym->flags & SYMBOL_NO_WRITE)
|
||||
sym->flags &= ~SYMBOL_WRITE;
|
||||
|
||||
if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES)
|
||||
|
|
|
@ -265,7 +265,7 @@ symbol_option_arg:
|
|||
choice: T_CHOICE word_opt T_EOL
|
||||
{
|
||||
struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE);
|
||||
sym->flags |= SYMBOL_AUTO;
|
||||
sym->flags |= SYMBOL_NO_WRITE;
|
||||
menu_add_entry(sym);
|
||||
menu_add_expr(P_CHOICE, NULL, NULL);
|
||||
free($2);
|
||||
|
|
Loading…
Reference in New Issue