diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-02-11 03:39:54 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-02-12 19:31:25 (GMT) |
commit | bf7ab1e70fd7621fea5dea07b6975c576119b86e (patch) | |
tree | 8d857c342799d9d75d704fd87ea29e42ce0454b6 /scripts/kconfig/conf.c | |
parent | 554c73c0256c9e22af1b89e842a310b73b5eb657 (diff) | |
download | u-boot-bf7ab1e70fd7621fea5dea07b6975c576119b86e.tar.xz |
kconfig: re-sync with Linux 4.10
Re-sync all files under the scripts/kconfig directory with
Linux 4.10.
Some parts include U-Boot own modification. I made sure to not
revert the following commits:
5b8031ccb4ed ("Add more SPDX-License-Identifier tags")
192bc6948b02 ("Fix GCC format-security errors and convert sprintfs.")
da58dec86616 ("Various Makefiles: Add SPDX-License-Identifier tags")
20c20826efab ("Kconfig: Enable usage of escape char '\' in string values")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r-- | scripts/kconfig/conf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 6c20431..866369f 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -5,6 +5,7 @@ #include <locale.h> #include <ctype.h> +#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -41,7 +42,7 @@ static int tty_stdio; static int valid_stdin = 1; static int sync_kconfig; static int conf_cnt; -static char line[128]; +static char line[PATH_MAX]; static struct menu *rootEntry; static void print_help(struct menu *menu) @@ -109,7 +110,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) /* fall through */ case oldaskconfig: fflush(stdout); - xfgets(line, 128, stdin); + xfgets(line, sizeof(line), stdin); if (!tty_stdio) printf("\n"); return 1; @@ -311,7 +312,7 @@ static int conf_choice(struct menu *menu) /* fall through */ case oldaskconfig: fflush(stdout); - xfgets(line, 128, stdin); + xfgets(line, sizeof(line), stdin); strip(line); if (line[0] == '?') { print_help(menu); |