]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - scripts/kconfig/confdata.c
Merge tag 'Smack-for-5.6' of git://github.com/cschaufler/smack-next
[linux.git] / scripts / kconfig / confdata.c
index fb675bd9a8092d114203f8a71458ee18f4d8c9d2..11f6c72c2eee226bce03a663f13e43e0c088a9f5 100644 (file)
@@ -1321,3 +1321,19 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode)
 
        return has_changed;
 }
+
+void conf_rewrite_mod_or_yes(enum conf_def_mode mode)
+{
+       struct symbol *sym;
+       int i;
+       tristate old_val = (mode == def_y2m) ? yes : mod;
+       tristate new_val = (mode == def_y2m) ? mod : yes;
+
+       for_all_symbols(i, sym) {
+               if (sym_get_type(sym) == S_TRISTATE &&
+                   sym->def[S_DEF_USER].tri == old_val) {
+                       sym->def[S_DEF_USER].tri = new_val;
+                       sym_add_change_count(1);
+               }
+       }
+}