]> git.baikalelectronics.ru Git - uboot.git/commit
env: ubi: add support of command env erase
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Wed, 14 Dec 2022 15:51:31 +0000 (16:51 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 11 Jan 2023 20:02:24 +0000 (15:02 -0500)
commita2a8b567e99e28a31f88a5ac5af12c569c8abc66
treeff8d11612ac3e09e37c27f8eaeeafe51287f7b63
parentc16e96d5fa3eca929de1be859395ee0ae6604627
env: ubi: add support of command env erase

Add support of opts erase for ubi env backend, this opts is used by
command 'env erase'.

This command only zero-fill the env UBI volume CONFIG_ENV_UBI_VOLUME
and CONFIG_ENV_UBI_VOLUME_REDUND, so the saved environment becomes
invalid.

This patch introduces a local define ENV_UBI_VOLUME_REDUND
only to avoid #if in the code, as CONFIG_ENV_UBI_VOLUME_REDUND
is only defined when CONFIG_SYS_REDUNDAND_ENVIRONMENT is defined.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
env/ubi.c