[RFC,08/10] env: Mark env_get_location as weak

Message ID 20171116092231.27740-9-maxime.ripard@free-electrons.com
State Superseded
Headers show
Series
  • env: Multiple env support and env transition for sunxi
Related show

Commit Message

Maxime Ripard Nov. 16, 2017, 9:22 a.m.
Allow boards and architectures to override the default environment lookup
code by overriding env_get_location.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 env/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lukasz Majewski Nov. 17, 2017, 9:26 a.m. | #1
On Thu, 16 Nov 2017 10:22:29 +0100
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:

> Allow boards and architectures to override the default environment

> lookup code by overriding env_get_location.

> 

> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

> ---

>  env/env.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/env/env.c b/env/env.c

> index 6af9f897b0ae..aceb77d4073c 100644

> --- a/env/env.c

> +++ b/env/env.c

> @@ -62,7 +62,7 @@ static enum env_location env_locations[] = {

>  

>  static enum env_location env_load_location;

>  

> -static enum env_location env_get_location(enum env_operation op, int

> prio) +__weak enum env_location env_get_location(enum env_operation

> op, int prio) {

>  	switch (op) {

>  	case ENVO_GET_CHAR:


Reviewed-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de

Patch

diff --git a/env/env.c b/env/env.c
index 6af9f897b0ae..aceb77d4073c 100644
--- a/env/env.c
+++ b/env/env.c
@@ -62,7 +62,7 @@  static enum env_location env_locations[] = {
 
 static enum env_location env_load_location;
 
-static enum env_location env_get_location(enum env_operation op, int prio)
+__weak enum env_location env_get_location(enum env_operation op, int prio)
 {
 	switch (op) {
 	case ENVO_GET_CHAR: