From f9461b41fe306ad4eedb6b5d17ea9e43d1ab3f92 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 22 Jan 2016 18:01:55 -0800 Subject: common/board_r: make should_load_env weak Make should_load_env a weak function. This allows a board to decide whether to load the environment or not. This can be useful when detecting recovery mode to avoid loading hostile environments. Signed-off-by: Stefan Agner Acked-by: Marcel Ziswiler --- common/board_r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/board_r.c b/common/board_r.c index b1ad6058e74..26ea942497e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -425,8 +425,8 @@ static int initr_dataflash(void) * important, since no verification is done on the environment. * * @return 0 if environment should not be loaded, !=0 if it is ok to load - */ -static int should_load_env(void) + */ +__weak int should_load_env(void) { #ifdef CONFIG_OF_CONTROL return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 1); -- cgit v1.2.3