summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBrenda Streiff <brenda.streiff@ni.com>2022-01-28 16:01:28 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-23 12:00:01 +0100
commit41da91158ed956778cf8bc34b91c1acd270a8f54 (patch)
tree20bcf79e2680be3ee393d20779f5ab55c046cd06 /scripts
parent913932a306f03e3f9fe9fb0bb2ac8aded83678ff (diff)
kconfig: let 'shell' return enough output for deep path names
[ Upstream commit 8a4c5b2a6d8ea079fa36034e8167de87ab6f8880 ] The 'shell' built-in only returns the first 256 bytes of the command's output. In some cases, 'shell' is used to return a path; by bumping up the buffer size to 4096 this lets us capture up to PATH_MAX. The specific case where I ran into this was due to commit 1e860048c53e ("gcc-plugins: simplify GCC plugin-dev capability test"). After this change, we now use `$(shell,$(CC) -print-file-name=plugin)` to return a path; if the gcc path is particularly long, then the path ends up truncated at the 256 byte mark, which makes the HAVE_GCC_PLUGINS depends test always fail. Signed-off-by: Brenda Streiff <brenda.streiff@ni.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/preprocess.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c
index 0590f86df6e4..748da578b418 100644
--- a/scripts/kconfig/preprocess.c
+++ b/scripts/kconfig/preprocess.c
@@ -141,7 +141,7 @@ static char *do_lineno(int argc, char *argv[])
static char *do_shell(int argc, char *argv[])
{
FILE *p;
- char buf[256];
+ char buf[4096];
char *cmd;
size_t nread;
int i;