-rw-r--r-- | scripts/kconfig/conf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 74c94c2..1602d5f 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -106,24 +106,25 @@ static void conf_askvalue(struct symbol *sym, const char *def) | |||
106 | case ask_silent: | 106 | case ask_silent: |
107 | if (sym_has_value(sym)) { | 107 | if (sym_has_value(sym)) { |
108 | printf("%s\n", def); | 108 | printf("%s\n", def); |
109 | return; | 109 | return; |
110 | } | 110 | } |
111 | if (!valid_stdin && input_mode == ask_silent) { | 111 | if (!valid_stdin && input_mode == ask_silent) { |
112 | printf("aborted!\n\n"); | 112 | printf("aborted!\n\n"); |
113 | printf("Console input/output is redirected. "); | 113 | printf("Console input/output is redirected. "); |
114 | printf("Run 'make oldconfig' to update configuration.\n\n"); | 114 | printf("Run 'make oldconfig' to update configuration.\n\n"); |
115 | exit(1); | 115 | exit(1); |
116 | } | 116 | } |
117 | case ask_all: | 117 | case ask_all: |
118 | fflush(stdout); | ||
118 | fgets(line, 128, stdin); | 119 | fgets(line, 128, stdin); |
119 | return; | 120 | return; |
120 | case set_default: | 121 | case set_default: |
121 | printf("%s\n", def); | 122 | printf("%s\n", def); |
122 | return; | 123 | return; |
123 | default: | 124 | default: |
124 | break; | 125 | break; |
125 | } | 126 | } |
126 | 127 | ||
127 | switch (type) { | 128 | switch (type) { |
128 | case S_INT: | 129 | case S_INT: |
129 | case S_HEX: | 130 | case S_HEX: |
@@ -333,47 +334,49 @@ static int conf_choice(struct menu *menu) | |||
333 | } | 334 | } |
334 | printo(NULL); | 335 | printo(NULL); |
335 | if (def_menu) | 336 | if (def_menu) |
336 | printf("[%s] ", menu_get_prompt(def_menu)); | 337 | printf("[%s] ", menu_get_prompt(def_menu)); |
337 | else { | 338 | else { |
338 | printf("\n"); | 339 | printf("\n"); |
339 | return 1; | 340 | return 1; |
340 | } | 341 | } |
341 | switch (input_mode) { | 342 | switch (input_mode) { |
342 | case ask_new: | 343 | case ask_new: |
343 | case ask_silent: | 344 | case ask_silent: |
344 | case ask_all: | 345 | case ask_all: |
346 | if (is_new) | ||
347 | sym->flags |= SYMBOL_NEW; | ||
345 | conf_askvalue(sym, menu_get_prompt(def_menu)); | 348 | conf_askvalue(sym, menu_get_prompt(def_menu)); |
346 | strip(line); | 349 | strip(line); |
347 | break; | 350 | break; |
348 | default: | 351 | default: |
349 | line[0] = 0; | 352 | line[0] = 0; |
350 | printf("\n"); | 353 | printf("\n"); |
351 | } | 354 | } |
352 | if (line[0] == '?' && !line[1]) { | 355 | if (line[0] == '?' && !line[1]) { |
353 | help = nohelp_text; | 356 | help = nohelp_text; |
354 | if (menu->sym->help) | 357 | if (menu->sym->help) |
355 | help = menu->sym->help; | 358 | help = menu->sym->help; |
356 | printf("\n%s\n", help); | 359 | printf("\n%s\n", help); |
357 | continue; | 360 | continue; |
358 | } | 361 | } |
359 | if (line[0]) { | 362 | if (line[0]) { |
360 | len = strlen(line) - 1; | 363 | len = strlen(line); |
361 | line[len] = 0; | 364 | line[len] = 0; |
362 | 365 | ||
363 | def_menu = NULL; | 366 | def_menu = NULL; |
364 | for (cmenu = menu->list; cmenu; cmenu = cmenu->next) { | 367 | for (cmenu = menu->list; cmenu; cmenu = cmenu->next) { |
365 | if (!cmenu->sym || !menu_is_visible(cmenu)) | 368 | if (!cmenu->sym || !menu_is_visible(cmenu)) |
366 | continue; | 369 | continue; |
367 | if (!strncmp(line, menu_get_prompt(cmenu), len)) { | 370 | if (!strncasecmp(line, menu_get_prompt(cmenu), len)) { |
368 | def_menu = cmenu; | 371 | def_menu = cmenu; |
369 | break; | 372 | break; |
370 | } | 373 | } |
371 | } | 374 | } |
372 | } | 375 | } |
373 | if (def_menu) { | 376 | if (def_menu) { |
374 | sym_set_choice_value(sym, def_menu->sym); | 377 | sym_set_choice_value(sym, def_menu->sym); |
375 | if (def_menu->list) { | 378 | if (def_menu->list) { |
376 | indent += 2; | 379 | indent += 2; |
377 | conf(def_menu->list); | 380 | conf(def_menu->list); |
378 | indent -= 2; | 381 | indent -= 2; |
379 | } | 382 | } |