X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=env%2Fnowhere.c;h=ea6c32eb3b77224eabf992cbd8ce333281ab4db4;hb=4f0b061444063d7c60e9624c5431c16f00d067af;hp=1a17d6978b90026525445fe9dbd6f55aaca47dd9;hpb=ac358beb85362fb2fac47aaec40a7e1bca49656c;p=oweals%2Fu-boot.git diff --git a/env/nowhere.c b/env/nowhere.c index 1a17d6978b..ea6c32eb3b 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -1,11 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2000-2010 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH * Andreas Heppel - - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -15,9 +14,20 @@ DECLARE_GLOBAL_DATA_PTR; -env_t *env_ptr; +/* + * Because we only ever have the default environment available we must mark + * it as invalid. + */ +static int env_nowhere_init(void) +{ + gd->env_addr = (ulong)&default_environment[0]; + gd->env_valid = ENV_INVALID; + + return 0; +} U_BOOT_ENV_LOCATION(nowhere) = { .location = ENVL_NOWHERE, + .init = env_nowhere_init, ENV_NAME("nowhere") };