Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Sep 4, 2007
2 parents bc5a6de + f82f3f9 commit a5229e6
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void check_stdin(void)
}
}

static void conf_askvalue(struct symbol *sym, const char *def)
static int conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
tristate val;
Expand All @@ -87,7 +87,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
printf("%s\n", def);
line[0] = '\n';
line[1] = 0;
return;
return 0;
}

switch (input_mode) {
Expand All @@ -97,23 +97,23 @@ static void conf_askvalue(struct symbol *sym, const char *def)
case set_random:
if (sym_has_value(sym)) {
printf("%s\n", def);
return;
return 0;
}
break;
case ask_new:
case ask_silent:
if (sym_has_value(sym)) {
printf("%s\n", def);
return;
return 0;
}
check_stdin();
case ask_all:
fflush(stdout);
fgets(line, 128, stdin);
return;
return 1;
case set_default:
printf("%s\n", def);
return;
return 1;
default:
break;
}
Expand All @@ -123,7 +123,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
case S_HEX:
case S_STRING:
printf("%s\n", def);
return;
return 1;
default:
;
}
Expand Down Expand Up @@ -174,6 +174,7 @@ static void conf_askvalue(struct symbol *sym, const char *def)
break;
}
printf("%s", line);
return 1;
}

int conf_string(struct menu *menu)
Expand All @@ -187,7 +188,8 @@ int conf_string(struct menu *menu)
def = sym_get_string_value(sym);
if (sym_get_string_value(sym))
printf("[%s] ", def);
conf_askvalue(sym, def);
if (!conf_askvalue(sym, def))
return 0;
switch (line[0]) {
case '\n':
break;
Expand Down Expand Up @@ -240,7 +242,8 @@ static int conf_sym(struct menu *menu)
if (menu_has_help(menu))
printf("/?");
printf("] ");
conf_askvalue(sym, sym_get_string_value(sym));
if (!conf_askvalue(sym, sym_get_string_value(sym)))
return 0;
strip(line);

switch (line[0]) {
Expand Down

0 comments on commit a5229e6

Please sign in to comment.