All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Mayer <mmayer@broadcom.com>
To: "Yann E. Morin" <yann.morin.1998@free.fr>
Cc: Michal Marek <mmarek@suse.com>, Sam Ravnborg <sam@ravnborg.org>,
	"Linux Kbuild" <linux-kbuild@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Broadcom Kernel List <bcm-kernel-feedback-list@broadcom.com>,
	Markus Mayer <mmayer@broadcom.com>
Subject: [RESEND PATCH] kconfig: allow kconfig to handle longer path names
Date: Wed, 9 Dec 2015 14:56:12 -0800	[thread overview]
Message-ID: <1449701772-25095-1-git-send-email-mmayer@broadcom.com> (raw)

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


             reply	other threads:[~2015-12-09 22:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 22:56 Markus Mayer [this message]
2015-12-10 10:07 ` [RESEND PATCH] kconfig: allow kconfig to handle longer path names Michal Marek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449701772-25095-1-git-send-email-mmayer@broadcom.com \
    --to=mmayer@broadcom.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=sam@ravnborg.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.