aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:41:02 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:41:02 -0400
commit2514395ef88b46e895726a8d40966cb83de7940c (patch)
tree216c6e194e81bdd9c97697cf162cc9505bde310a /scripts/kconfig/conf.c
parentb3967dc566bc89df19e9aeb87b2fd483418b02e6 (diff)
parentb5ac4817de3032796c558b0a32062e7392b5ea60 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: kconfig: fix typo in change count initialization kconfig: recenter menuconfig kconfig: revert conf behaviour change kconfig: fix default value for choice input kbuild: fix NULL dereference in scripts/mod/modpost.c kbuild: fix mode of checkstack.pl and other files. kbuild: rebuild initramfs if content of initramfs changes kbuild: properly pass options to hostcc when doing make O=.. kbuild: modules_install for external modules must not remove existing modules kbuild: fix make dir/ ver_linux: don't print reiser4progs version if none found kbuild: mips: fix sed regexp to generate asm-offset.h kbuild: fix building single targets with make O=.. single-target kbuild: use relative path to -I kbuild: fix unneeded rebuilds in drivers/net/chelsio after moving source tree kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree kbuild: fix garbled text in modules.txt
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 ?