From 74dba80913775c78a1e03221c9ea51027a8b7bcf Mon Sep 17 00:00:00 2001 From: Markus Mayer Date: Wed, 9 Dec 2015 14:56:12 -0800 Subject: 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 --- scripts/kconfig/conf.c | 7 ++++--- 1 file 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 #include +#include #include #include #include @@ -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); -- cgit v1.2.3 From aab24a897cfba9dd371f6aac45dbcdae0b23def6 Mon Sep 17 00:00:00 2001 From: Vegard Nossum Date: Fri, 1 Jan 2016 17:34:05 +0100 Subject: kconfig: return 'false' instead of 'no' in bool function menu_is_visible() is a bool function and should use boolean return values. "no" is a tristate value which happens to also have a value of 0, but we should nevertheless use the right symbol for it. This is a very minor cleanup with no semantic change. Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility") Cc: Arnaud Lacombe Cc: Mauro Carvalho Chehab Signed-off-by: Vegard Nossum Signed-off-by: Michal Marek --- scripts/kconfig/menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index b05cc3d4a9be..aed678e8a777 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -477,7 +477,7 @@ bool menu_is_visible(struct menu *menu) if (menu->visibility) { if (expr_calc_value(menu->visibility) == no) - return no; + return false; } sym = menu->sym; -- cgit v1.2.3 From 5b61c7bd25f13daa58f2507991e87e990d7c6010 Mon Sep 17 00:00:00 2001 From: Chris Bainbridge Date: Fri, 8 Jan 2016 20:44:04 +0000 Subject: kconfig: fix qconf segfault by deleting heap objects On Debian stable (qt-4.8.6) 'make xconfig' intermittently fails due to qconf segfaulting at exit time in QXcbEventReader. The cause of this is destructors on the heap objects never being called, so fix this by properly deleting the heap objects before exit. Signed-off-by: Chris Bainbridge Signed-off-by: Michal Marek --- scripts/kconfig/qconf.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 91b7e6fbc364..fc5555992220 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1863,6 +1863,8 @@ int main(int ac, char** av) configSettings->endGroup(); delete configSettings; + delete v; + delete configApp; return 0; } -- cgit v1.2.3