aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMarkus Mayer <mmayer@broadcom.com>2015-12-09 17:56:12 -0500
committerMichal Marek <mmarek@suse.com>2015-12-10 05:06:10 -0500
commit74dba80913775c78a1e03221c9ea51027a8b7bcf (patch)
tree1f6ac8453549e7c489d93269a8a6b3ac90785bbd /scripts
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
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')
-rw-r--r--scripts/kconfig/conf.c7
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 @@
5 5
6#include <locale.h> 6#include <locale.h>
7#include <ctype.h> 7#include <ctype.h>
8#include <limits.h>
8#include <stdio.h> 9#include <stdio.h>
9#include <stdlib.h> 10#include <stdlib.h>
10#include <string.h> 11#include <string.h>
@@ -41,7 +42,7 @@ static int tty_stdio;
41static int valid_stdin = 1; 42static int valid_stdin = 1;
42static int sync_kconfig; 43static int sync_kconfig;
43static int conf_cnt; 44static int conf_cnt;
44static char line[128]; 45static char line[PATH_MAX];
45static struct menu *rootEntry; 46static struct menu *rootEntry;
46 47
47static void print_help(struct menu *menu) 48static void print_help(struct menu *menu)
@@ -109,7 +110,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
109 /* fall through */ 110 /* fall through */
110 case oldaskconfig: 111 case oldaskconfig:
111 fflush(stdout); 112 fflush(stdout);
112 xfgets(line, 128, stdin); 113 xfgets(line, sizeof(line), stdin);
113 if (!tty_stdio) 114 if (!tty_stdio)
114 printf("\n"); 115 printf("\n");
115 return 1; 116 return 1;
@@ -311,7 +312,7 @@ static int conf_choice(struct menu *menu)
311 /* fall through */ 312 /* fall through */
312 case oldaskconfig: 313 case oldaskconfig:
313 fflush(stdout); 314 fflush(stdout);
314 xfgets(line, 128, stdin); 315 xfgets(line, sizeof(line), stdin);
315 strip(line); 316 strip(line);
316 if (line[0] == '?') { 317 if (line[0] == '?') {
317 print_help(menu); 318 print_help(menu);