[PATCH 1/6] env: allow to copy value from default environment into a buffer

Tom Rini trini at konsulko.com
Thu Nov 9 22:22:46 CET 2023


On Wed, Nov 08, 2023 at 03:20:30PM +0100, Quentin Schulz wrote:

> From: Quentin Schulz <quentin.schulz at theobroma-systems.com>
> 
> env_get_default suffers from a particular issue int that it can only
> return a value truncated to gd->env_buf (32) characters. This may be
> enough for most variables but it isn't for others, so let's allow users
> to provide a preallocated buffer to copy the value into instead,
> allowing for more control, though it'll still be truncated if the value
> size is bigger than the preallocated buffer.
> 
> Cc: Quentin Schulz <foss+uboot at 0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz at theobroma-systems.com>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231109/433543b6/attachment.sig>


More information about the U-Boot mailing list