diff options
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r-- | scripts/kconfig/conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index f69591c69..80bd55a68 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -142,7 +142,8 @@ static void conf_askvalue(struct symbol *sym, const char *def) | |||
142 | check_stdin(); | 142 | check_stdin(); |
143 | case ask_all: | 143 | case ask_all: |
144 | fflush(stdout); | 144 | fflush(stdout); |
145 | fgets(line, 128, stdin); | 145 | if (!fgets(line, 128, stdin)) |
146 | exit(1); | ||
146 | return; | 147 | return; |
147 | case set_default: | 148 | case set_default: |
148 | printf("%s\n", def); | 149 | printf("%s\n", def); |
@@ -395,7 +396,8 @@ static int conf_choice(struct menu *menu) | |||
395 | check_stdin(); | 396 | check_stdin(); |
396 | case ask_all: | 397 | case ask_all: |
397 | fflush(stdout); | 398 | fflush(stdout); |
398 | fgets(line, 128, stdin); | 399 | if (!fgets(line, 128, stdin)) |
400 | exit(1); | ||
399 | strip(line); | 401 | strip(line); |
400 | if (line[0] == '?') { | 402 | if (line[0] == '?') { |
401 | printf("\n%s\n", menu->sym->help ? | 403 | printf("\n%s\n", menu->sym->help ? |