X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fconf.c;h=e525e5ec0245822ffd918f83cd0d982c07038042;hp=392cefd68daf03a68be5747733c51118c623e72b;hb=9c442ba3b556bebdf5e95373d9532f5a5a3af11b;hpb=991f1fbe02ccfd2595908a03369621ab05cd21ff diff --git a/config/conf.c b/config/conf.c index 392cefd..e525e5e 100644 --- a/config/conf.c +++ b/config/conf.c @@ -354,9 +354,11 @@ static void conf(struct menu *menu) switch (prop->type) { case P_MENU: - if ((input_mode == listnewconfig || - input_mode == oldnoconfig) && - rootEntry != menu) { + /* + * Except in oldaskconfig mode, we show only menus that + * contain new symbols. + */ + if (input_mode != oldaskconfig && rootEntry != menu) { check_conf(menu); return; } @@ -416,10 +418,20 @@ 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 (input_mode != oldnoconfig) { + } else { if (!conf_cnt++) printf(_("*\n* Restart config...\n*\n")); rootEntry = menu_get_parent_menu(menu); @@ -630,9 +642,7 @@ int main(int ac, char **av) do { conf_cnt = 0; check_conf(&rootmenu); - } while (conf_cnt && - (input_mode != listnewconfig && - input_mode != oldnoconfig)); + } while (conf_cnt); break; }