]> git.sur5r.net Git - kconfig-frontends/commitdiff
sync with current Linux kernel code
authorYann E. MORIN" <yann.morin.1998@free.fr>
Sat, 31 Mar 2012 20:45:47 +0000 (22:45 +0200)
committerYann E. MORIN" <yann.morin.1998@free.fr>
Sat, 31 Mar 2012 20:45:47 +0000 (22:45 +0200)
Yes, we sync up with a random snapshot of the Linux kernel,
but the changeset number is in our version string, anyway.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
.version
docs/kconfig-language.txt
docs/kconfig.txt
libs/parser/confdata.c
libs/parser/symbol.c
misc/merge_config.sh

index ebac19e3e3bd961b8697642f3c14963c90bd7969..eb1a2c1718109c6521ff7ec4589ef6a86cf22495 100644 (file)
--- a/.version
+++ b/.version
@@ -1,2 +1,2 @@
-3.3.0 c16fa4f2ad19908a47c63d8fa436a1178438c7e7 Saber-toothed Squirrel
+3.3.0 fa2a4519cb6ad94224eb56a1341fff570fd44ea1 Saber-toothed Squirrel
 hg
index 44e2649fbb295db936245c4c0de09109738bfc5e..a686f9cd69c11797f85bea64333b30a33c97e612 100644 (file)
@@ -117,7 +117,7 @@ applicable everywhere (see syntax).
   This attribute is only applicable to menu blocks, if the condition is
   false, the menu block is not displayed to the user (the symbols
   contained there can still be selected by other symbols, though). It is
-  similar to a conditional "prompt" attribude for individual menu
+  similar to a conditional "prompt" attribute for individual menu
   entries. Default value of "visible" is true.
 
 - numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
index c313d71324b4a83db6934114e86af7eed0f30be6..9d5f2a90dca96b600c1ee1bd107620c6dd1e4523 100644 (file)
@@ -28,12 +28,10 @@ new (default) values, so you can use:
 
        grep "(NEW)" conf.new
 
-to see the new config symbols or you can 'diff' the previous and
-new .config files to see the differences:
+to see the new config symbols or you can use diffconfig to see the
+differences between the previous and new .config files:
 
-       diff .config.old .config | less
-
-(Yes, we need something better here.)
+       scripts/diffconfig .config.old .config | less
 
 ______________________________________________________________________
 Environment variables for '*config'
index 7c7a5a6cc3f504bd759dc01019536b2bf804fbbd..0586085136d1304eebaa43142be468e4a7f40c8c 100644 (file)
@@ -344,10 +344,8 @@ setsym:
 
 int conf_read(const char *name)
 {
-       struct symbol *sym, *choice_sym;
-       struct property *prop;
-       struct expr *e;
-       int i, flags;
+       struct symbol *sym;
+       int i;
 
        sym_set_change_count(0);
 
@@ -357,7 +355,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))
-                       goto sym_ok;
+                       continue;
                if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
                        /* check that calculated value agrees with saved value */
                        switch (sym->type) {
@@ -366,30 +364,18 @@ int conf_read(const char *name)
                                if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
                                        break;
                                if (!sym_is_choice(sym))
-                                       goto sym_ok;
+                                       continue;
                                /* fall through */
                        default:
                                if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
-                                       goto sym_ok;
+                                       continue;
                                break;
                        }
                } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE))
                        /* no previous value and not saved */
-                       goto sym_ok;
+                       continue;
                conf_unsaved++;
                /* maybe print value in verbose mode... */
-       sym_ok:
-               if (!sym_is_choice(sym))
-                       continue;
-               /* The choice symbol only has a set value (and thus is not new)
-                * if all its visible childs have values.
-                */
-               prop = sym_get_choice_prop(sym);
-               flags = sym->flags;
-               expr_list_for_each_sym(prop->expr, e, choice_sym)
-                       if (choice_sym->visible != no)
-                               flags &= choice_sym->flags;
-               sym->flags &= flags | ~SYMBOL_DEF_USER;
        }
 
        for_all_symbols(i, sym) {
index 071f00c3046e69e77112a4e5cf56d4f686fc101f..22a3c400fc41119c8c8f4197c3dfcdde87b0a882 100644 (file)
@@ -262,11 +262,18 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
        struct symbol *def_sym;
        struct property *prop;
        struct expr *e;
+       int flags;
 
        /* first calculate all choice values' visibilities */
+       flags = sym->flags;
        prop = sym_get_choice_prop(sym);
-       expr_list_for_each_sym(prop->expr, e, def_sym)
+       expr_list_for_each_sym(prop->expr, e, def_sym) {
                sym_calc_visibility(def_sym);
+               if (def_sym->visible != no)
+                       flags &= def_sym->flags;
+       }
+
+       sym->flags &= flags | ~SYMBOL_DEF_USER;
 
        /* is the user choice visible? */
        def_sym = sym->def[S_DEF_USER].val;
index ceadf0e150cfe6cf4bc3d087b79b52df70f45a2e..974d5cb7e30a5eb8abdd718371341160f9964dbb 100755 (executable)
@@ -31,10 +31,12 @@ usage() {
        echo "  -h    display this help text"
        echo "  -m    only merge the fragments, do not execute the make command"
        echo "  -n    use allnoconfig instead of alldefconfig"
+       echo "  -r    list redundant entries when merging fragments"
 }
 
 MAKE=true
 ALLTARGET=alldefconfig
+WARNREDUN=false
 
 while true; do
        case $1 in
@@ -52,18 +54,27 @@ while true; do
                usage
                exit
                ;;
+       "-r")
+               WARNREDUN=true
+               shift
+               continue
+               ;;
        *)
                break
                ;;
        esac
 done
 
-
+INITFILE=$1
+shift;
 
 MERGE_LIST=$*
 SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
 TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
 
+echo "Using $INITFILE as base"
+cat $INITFILE > $TMP_FILE
+
 # Merge files, printing warnings on overrided values
 for MERGE_FILE in $MERGE_LIST ; do
        echo "Merging $MERGE_FILE"
@@ -79,6 +90,8 @@ for MERGE_FILE in $MERGE_LIST ; do
                        echo Previous  value: $PREV_VAL
                        echo New value:       $NEW_VAL
                        echo
+                       elif [ "$WARNREDUN" = "true" ]; then
+                       echo Value of $CFG is redundant by fragment $MERGE_FILE:
                        fi
                        sed -i "/$CFG[ =]/d" $TMP_FILE
                fi