diff options
author | Markus Mayer <mmayer@broadcom.com> | 2015-12-09 14:56:12 -0800 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2015-12-10 11:06:10 +0100 |
commit | 74dba80913775c78a1e03221c9ea51027a8b7bcf (patch) | |
tree | 1f6ac8453549e7c489d93269a8a6b3ac90785bbd /scripts/kconfig | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) | |
download | talos-obmc-linux-74dba80913775c78a1e03221c9ea51027a8b7bcf.tar.gz talos-obmc-linux-74dba80913775c78a1e03221c9ea51027a8b7bcf.zip |
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 <mmayer@broadcom.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/kconfig')
-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 6c204318bc94..866369f10ff8 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); |