Re: [PATCH AUTOSEL 4.19 06/11] kconfig: let 'shell' return enough output for deep path names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> [ 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.

If the idea is to support up-to PATH_MAX, perhaps open-coded 4096
should be replaced by PATH_MAX in the code, too?

Best regards,
								Pavel

> +++ b/scripts/kconfig/preprocess.c
> @@ -138,7 +138,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;

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux