nowhere.c 702 B

12345678910111213141516171819202122232425262728293031323334
  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. * SPDX-License-Identifier: GPL-2.0+
  8. */
  9. #include <common.h>
  10. #include <command.h>
  11. #include <environment.h>
  12. #include <linux/stddef.h>
  13. DECLARE_GLOBAL_DATA_PTR;
  14. /*
  15. * Because we only ever have the default environment available we must mark
  16. * it as invalid.
  17. */
  18. static int env_nowhere_init(void)
  19. {
  20. gd->env_addr = (ulong)&default_environment[0];
  21. gd->env_valid = ENV_INVALID;
  22. return 0;
  23. }
  24. U_BOOT_ENV_LOCATION(nowhere) = {
  25. .location = ENVL_NOWHERE,
  26. .init = env_nowhere_init,
  27. ENV_NAME("nowhere")
  28. };