aboutsummaryrefslogtreecommitdiff
path: root/include/env.h
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2019-11-25 09:07:36 +0100
committerTom Rini <trini@konsulko.com>2019-12-06 16:44:18 -0500
commit1ac2cb974142132d9bfd988e6a8702d7a66958e0 (patch)
treef1f0b21202eb59c0af89649a9f2a89e6082822f9 /include/env.h
parentbead4f2f2c85e1bf39d2c80ef733f1325eb336bb (diff)
downloadu-boot-1ac2cb974142132d9bfd988e6a8702d7a66958e0.zip
u-boot-1ac2cb974142132d9bfd988e6a8702d7a66958e0.tar.gz
u-boot-1ac2cb974142132d9bfd988e6a8702d7a66958e0.tar.bz2
cmd: Migrate from_env() from pxe.c to nvedit.c
Migrate from_env() from pxe.c to nvedit.c as it's not pxe specific. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Diffstat (limited to 'include/env.h')
-rw-r--r--include/env.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h
index b72239f..d6c2d75 100644
--- a/include/env.h
+++ b/include/env.h
@@ -113,6 +113,16 @@ int env_match(unsigned char *name, int index);
*/
char *env_get(const char *varname);
+/*
+ * Like env_get, but prints an error if envvar isn't defined in the
+ * environment. It always returns what env_get does, so it can be used in
+ * place of env_get without changing error handling otherwise.
+ *
+ * @varname: Variable to look up
+ * @return value of variable, or NULL if not found
+ */
+char *from_env(const char *envvar);
+
/**
* env_get_f() - Look up the value of an environment variable (early)
*