aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 4da3b4adfad2..e39fcd8143ea 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -36,6 +36,7 @@ enum input_mode {
36} input_mode = oldaskconfig; 36} input_mode = oldaskconfig;
37 37
38static int indent = 1; 38static int indent = 1;
39static int tty_stdio;
39static int valid_stdin = 1; 40static int valid_stdin = 1;
40static int sync_kconfig; 41static int sync_kconfig;
41static int conf_cnt; 42static int conf_cnt;
@@ -108,6 +109,8 @@ static int conf_askvalue(struct symbol *sym, const char *def)
108 case oldaskconfig: 109 case oldaskconfig:
109 fflush(stdout); 110 fflush(stdout);
110 xfgets(line, 128, stdin); 111 xfgets(line, 128, stdin);
112 if (!tty_stdio)
113 printf("\n");
111 return 1; 114 return 1;
112 default: 115 default:
113 break; 116 break;
@@ -495,6 +498,8 @@ int main(int ac, char **av)
495 bindtextdomain(PACKAGE, LOCALEDIR); 498 bindtextdomain(PACKAGE, LOCALEDIR);
496 textdomain(PACKAGE); 499 textdomain(PACKAGE);
497 500
501 tty_stdio = isatty(0) && isatty(1) && isatty(2);
502
498 while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) { 503 while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) {
499 input_mode = (enum input_mode)opt; 504 input_mode = (enum input_mode)opt;
500 switch (opt) { 505 switch (opt) {
@@ -621,7 +626,7 @@ int main(int ac, char **av)
621 return 1; 626 return 1;
622 } 627 }
623 } 628 }
624 valid_stdin = isatty(0) && isatty(1) && isatty(2); 629 valid_stdin = tty_stdio;
625 } 630 }
626 631
627 switch (input_mode) { 632 switch (input_mode) {