Commit 6b206194 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] ignore attempts to change unchangable symbols

This fixes a problem which can show up with the new select facility, e.g.
a symbol is forced to 'y', so we should never even try to change such
symbols.
parent cffbe99e
......@@ -73,6 +73,13 @@ static void conf_askvalue(struct symbol *sym, const char *def)
line[0] = '\n';
line[1] = 0;
if (!sym_is_changable(sym)) {
printf("%s\n", def);
line[0] = '\n';
line[1] = 0;
return;
}
switch (input_mode) {
case ask_new:
case ask_silent:
......@@ -82,12 +89,6 @@ static void conf_askvalue(struct symbol *sym, const char *def)
}
check_stdin();
case ask_all:
if (!sym_is_changable(sym)) {
printf("%s\n", def);
line[0] = '\n';
line[1] = 0;
return;
}
fflush(stdout);
fgets(line, 128, stdin);
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment