From: Markus Mayer Date: Wed, 9 Dec 2015 22:56:12 +0000 (-0800) Subject: kconfig: allow kconfig to handle longer path names X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=4f0ff3e00285b285bdab7d43393a3d393e9d415e;p=carl9170fw.git kconfig: allow kconfig to handle longer path names The current (arbitrary) limit of 128 characters for path names has proven too short for Android builds, as longer path names are used there. Change conf.c, so it can handle path lengths up to PATH_MAX characters. Signed-off-by: Markus Mayer Signed-off-by: Michal Marek Signed-off-by: Christian Lamparter --- diff --git a/config/conf.c b/config/conf.c index 6b6cba5..6be6143 100644 --- a/config/conf.c +++ b/config/conf.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -39,7 +40,7 @@ static int indent = 1; static int tty_stdio; static int valid_stdin = 1; static int conf_cnt; -static char line[128]; +static char line[PATH_MAX]; static struct menu *rootEntry; static void print_help(struct menu *menu) @@ -106,7 +107,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; @@ -307,7 +308,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);