Browse Source

Check environment size from fw_env.config

Environment size must be set (it was optional for old tools). Skip all
configuration line without a correct value for the environment size.

Signed-off-by: Stefano Babic <sbabic@denx.de>
pull/5/head
Stefano Babic 5 years ago
parent
commit
3b2d4f1de7
  1. 6
      src/uboot_env.c

6
src/uboot_env.c

@ -1113,6 +1113,12 @@ int libuboot_read_config(struct uboot_ctx *ctx, const char *config)
if (ret < 3 || !tmp)
continue;
/*
* If size is set but zero, entry is wrong
*/
if (!dev->envsize)
return -EINVAL;
if (!ctx->size)
ctx->size = dev->envsize;

Loading…
Cancel
Save