Removing this ifdef/endif pair yields a "defined but unused warning"
for CONFIG_CMD_SAVEENV=n, but that vanishes if we use the ENV_SAVE_PTR
macro instead. This gives slightly better compile testing, and
moreover, it's possible to have
CONFIG_CMD_SAVEENV=n
CONFIG_SPL_SAVEENV=y
SPL_ENV_IS_IN_EXT4=y
in which case env_ext4_save would erroneously not be compiled in.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
return (const char *)CONFIG_ENV_EXT4_DEVICE_AND_PART;
}
-#ifdef CONFIG_CMD_SAVEENV
static int env_ext4_save(void)
{
env_t env_new;
puts("done\n");
return 0;
}
-#endif /* CONFIG_CMD_SAVEENV */
static int env_ext4_load(void)
{
.location = ENVL_EXT4,
ENV_NAME("EXT4")
.load = env_ext4_load,
- .save = env_save_ptr(env_ext4_save),
+ .save = ENV_SAVE_PTR(env_ext4_save),
};