kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE
authorDirk Gouders <dirk@gouders.net>
Tue, 3 Jul 2018 12:43:31 +0000 (14:43 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 21:14:30 +0000 (22:14 +0100)
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>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/confdata.c
config/expr.h
config/menu.c
config/symbol.c
config/zconf.y

index 4af0fbb1774c4d7bafea6794d9b772cb9c2b75fe..481b07b10eb9191fe4dde158e9feb43770b246fb 100644 (file)
@@ -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 */
@@ -878,7 +878,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) {
index f63b41b0dd498d23b65b3c12fe47e3b2c87e148d..84a5199bb46b94894195d39fbda084b6542a38ec 100644 (file)
@@ -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 */
 
index 379a119dcd1e47bfbf69c9273129ce3859883d08..4cf15d449c05d2a126d0a3fa9af592068b8ff5d7 100644 (file)
@@ -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;
index 7c9a88e91cfad95f8fa2e350c2dcccb92981d36f..869a5e8e87a5a84773f7c4ee64d641bb34cbc453 100644 (file)
@@ -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)
index d9a095200e9dd94163401d577309cce435863cf6..496bf27dd8ce97955eed182e6bd278accc07faa9 100644 (file)
@@ -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);