aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-11 12:51:40 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-11 12:51:40 -0400
commit10a5fd5e6b7e2d464c9f95f67cade4ddbd63f4e1 (patch)
treeeddf856286234f28cac747d20eb59d918e1bc8b5 /scripts/kconfig/conf.c
parentc2a6585296009379e0f4eff39cdcb108b457ebf2 (diff)
parenta145410dccdb44f81d3b56763ef9b6f721f4e47c (diff)
Merge branch 'master'
Conflicts: drivers/scsi/libata-scsi.c include/linux/libata.h
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r--scripts/kconfig/conf.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 10eeae53d827..ae5ab981bb1d 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -63,20 +63,6 @@ static void check_stdin(void)
63 } 63 }
64} 64}
65 65
66static char *fgets_check_stream(char *s, int size, FILE *stream)
67{
68 char *ret = fgets(s, size, stream);
69
70 if (ret == NULL && feof(stream)) {
71 printf(_("aborted!\n\n"));
72 printf(_("Console input is closed. "));
73 printf(_("Run 'make oldconfig' to update configuration.\n\n"));
74 exit(1);
75 }
76
77 return ret;
78}
79
80static void conf_askvalue(struct symbol *sym, const char *def) 66static void conf_askvalue(struct symbol *sym, const char *def)
81{ 67{
82 enum symbol_type type = sym_get_type(sym); 68 enum symbol_type type = sym_get_type(sym);
@@ -114,7 +100,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
114 check_stdin(); 100 check_stdin();
115 case ask_all: 101 case ask_all:
116 fflush(stdout); 102 fflush(stdout);
117 fgets_check_stream(line, 128, stdin); 103 fgets(line, 128, stdin);
118 return; 104 return;
119 case set_default: 105 case set_default:
120 printf("%s\n", def); 106 printf("%s\n", def);
@@ -328,8 +314,7 @@ static int conf_choice(struct menu *menu)
328 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); 314 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
329 def_sym = sym_get_choice_value(sym); 315 def_sym = sym_get_choice_value(sym);
330 cnt = def = 0; 316 cnt = def = 0;
331 line[0] = '0'; 317 line[0] = 0;
332 line[1] = 0;
333 for (child = menu->list; child; child = child->next) { 318 for (child = menu->list; child; child = child->next) {
334 if (!menu_is_visible(child)) 319 if (!menu_is_visible(child))
335 continue; 320 continue;
@@ -370,7 +355,7 @@ static int conf_choice(struct menu *menu)
370 check_stdin(); 355 check_stdin();
371 case ask_all: 356 case ask_all:
372 fflush(stdout); 357 fflush(stdout);
373 fgets_check_stream(line, 128, stdin); 358 fgets(line, 128, stdin);
374 strip(line); 359 strip(line);
375 if (line[0] == '?') { 360 if (line[0] == '?') {
376 printf("\n%s\n", menu->sym->help ? 361 printf("\n%s\n", menu->sym->help ?