env: move more common code to env_import_redund
There is more common code in mmc, nand and ubi env drivers that can be shared by moving to env_import_redund. For this, a status/error value whether the buffers were loaded are passed as additional parameters to env_import_redund. Ideally, these are already returned to the env driver by the storage driver. This is the case for mmc, nand and ubi, so for this change, code deduplicated. Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
committed by
Tom Rini
parent
42a1820bbc
commit
31f044bd91
@@ -297,7 +297,8 @@ int env_export(env_t *env_out);
|
||||
|
||||
#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
|
||||
/* Select and import one of two redundant environments */
|
||||
int env_import_redund(const char *buf1, const char *buf2);
|
||||
int env_import_redund(const char *buf1, int buf1_status,
|
||||
const char *buf2, int buf2_status);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user