Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287979 > unrolled thread

[RESEND PATCH] kconfig: allow kconfig to handle longer path names

Started byMarkus Mayer <mmayer@broadcom.com>
First post2015-12-10 00:00 +0100
Last post2015-12-10 11:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [RESEND PATCH] kconfig: allow kconfig to handle longer path names Markus Mayer <mmayer@broadcom.com> - 2015-12-10 00:00 +0100
    Re: [RESEND PATCH] kconfig: allow kconfig to handle longer path names Michal Marek <mmarek@suse.com> - 2015-12-10 11:10 +0100

#1287979 — [RESEND PATCH] kconfig: allow kconfig to handle longer path names

FromMarkus Mayer <mmayer@broadcom.com>
Date2015-12-10 00:00 +0100
Subject[RESEND PATCH] kconfig: allow kconfig to handle longer path names
Message-ID<qDVSk-65j-55@gated-at.bofh.it>
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>
---
 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 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);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1288418

FromMichal Marek <mmarek@suse.com>
Date2015-12-10 11:10 +0100
Message-ID<qE6kF-4M5-7@gated-at.bofh.it>
In reply to#1287979
On 2015-12-09 23:56, Markus Mayer wrote:
> 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>
> ---
>  scripts/kconfig/conf.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Thanks, applied to kbuild.git#kconfig.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web