kconfig: extend output of 'listnewconfig'
[carl9170fw.git] / config / conf.c
index 927e3ba5830f0aeb7fdf19de3768f013494411f2..e525e5ec0245822ffd918f83cd0d982c07038042 100644 (file)
@@ -354,8 +354,11 @@ static void conf(struct menu *menu)
 
                switch (prop->type) {
                case P_MENU:
-                       if (input_mode == listnewconfig) &&
-                           rootEntry != menu) {
+                       /*
+                        * Except in oldaskconfig mode, we show only menus that
+                        * contain new symbols.
+                        */
+                       if (input_mode != oldaskconfig && rootEntry != menu) {
                                check_conf(menu);
                                return;
                        }
@@ -415,8 +418,18 @@ static void check_conf(struct menu *menu)
                if (sym_is_changable(sym) ||
                    (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
                        if (input_mode == listnewconfig) {
-                               if (sym->name && !sym_is_choice_value(sym)) {
-                                       printf("%s%s\n", CONFIG_, sym->name);
+                               if (sym->name) {
+                                       const char *str;
+
+                                       if (sym->type == S_STRING) {
+                                               str = sym_get_string_value(sym);
+                                               str = sym_escape_string_value(str);
+                                               printf("%s%s=%s\n", CONFIG_, sym->name, str);
+                                               free((void *)str);
+                                       } else {
+                                               str = sym_get_string_value(sym);
+                                               printf("%s%s=%s\n", CONFIG_, sym->name, str);
+                                       }
                                }
                        } else {
                                if (!conf_cnt++)