env: Move env_valid to env.h
[oweals/u-boot.git] / include / env.h
index 42d8bcfa5052623c1b8e957be06ccb36b73579fa..b59c3c36f20238ccd61f38cb1a3772c45e925b24 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Common environment functions
+ * Common environment functions and definitions
  *
  * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 
 struct environment_s;
 
+/* Value for environment validity */
+enum env_valid {
+       ENV_INVALID,    /* No valid environment */
+       ENV_VALID,      /* First or only environment is valid */
+       ENV_REDUND,     /* Redundant environment is valid */
+};
+
 /**
  * env_get_id() - Gets a sequence number for the environment
  *
@@ -278,4 +285,11 @@ void env_set_default(const char *s, int flags);
  */
 int env_get_char(int index);
 
+/**
+ * env_reloc() - Relocate the 'env' sub-commands
+ *
+ * This is used for those unfortunate archs with crappy toolchains
+ */
+void env_reloc(void);
+
 #endif