]> git.sur5r.net Git - u-boot/blob - env/nowhere.c
env: Mark env_get_location as weak
[u-boot] / env / nowhere.c
1 /*
2  * (C) Copyright 2000-2010
3  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4  *
5  * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
6  * Andreas Heppel <aheppel@sysgo.de>
7
8  * SPDX-License-Identifier:     GPL-2.0+
9  */
10
11 #include <common.h>
12 #include <command.h>
13 #include <environment.h>
14 #include <linux/stddef.h>
15
16 DECLARE_GLOBAL_DATA_PTR;
17
18 /*
19  * Because we only ever have the default environment available we must mark
20  * it as invalid.
21  */
22 static int env_nowhere_init(void)
23 {
24         gd->env_addr    = (ulong)&default_environment[0];
25         gd->env_valid   = ENV_INVALID;
26
27         return 0;
28 }
29
30 U_BOOT_ENV_LOCATION(nowhere) = {
31         .location       = ENVL_NOWHERE,
32         .init           = env_nowhere_init,
33         ENV_NAME("nowhere")
34 };