From patchwork Thu Dec 10 22:13:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 555364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 2D7DD140213 for ; Fri, 11 Dec 2015 09:13:30 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 628D895B25; Thu, 10 Dec 2015 22:13:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 83Odar6DxjOA; Thu, 10 Dec 2015 22:13:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7E88F95B1B; Thu, 10 Dec 2015 22:13:27 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 420531BFBF9 for ; Thu, 10 Dec 2015 22:13:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3CA9592912 for ; Thu, 10 Dec 2015 22:13:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Omm93v7Qbarb for ; Thu, 10 Dec 2015 22:13:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gw2-out.broadcom.com (mail-gw2-out.broadcom.com [216.31.210.63]) by whitealder.osuosl.org (Postfix) with ESMTP id 7F49392915 for ; Thu, 10 Dec 2015 22:13:26 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.20,410,1444719600"; d="scan'208";a="83084770" Received: from irvexchcas07.broadcom.com (HELO IRVEXCHCAS07.corp.ad.broadcom.com) ([10.9.208.55]) by mail-gw2-out.broadcom.com with ESMTP; 10 Dec 2015 14:49:23 -0800 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.235.1; Thu, 10 Dec 2015 14:13:25 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.235.1; Thu, 10 Dec 2015 14:13:25 -0800 Received: from lbrmn-mmayer.lab.lan (unknown [10.136.8.183]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 8FD6E40FE5; Thu, 10 Dec 2015 14:09:57 -0800 (PST) From: Markus Mayer To: Subject: [PATCH] config: allow config to handle longer path names Date: Thu, 10 Dec 2015 14:13:11 -0800 Message-ID: <1449785591-12550-1-git-send-email-mmayer@broadcom.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" 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 --- This change was also submitted to the Linux community and has been accepted. https://git.kernel.org/cgit/linux/kernel/git/mmarek/kbuild.git/commit/?h=kconfig&id=74dba80913775c78a1e03221c9ea51027a8b7bcf extra/config/conf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extra/config/conf.c b/extra/config/conf.c index b24c1c3..34bb4f5 100644 --- a/extra/config/conf.c +++ b/extra/config/conf.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -40,7 +41,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) @@ -108,7 +109,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; @@ -310,7 +311,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);