summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/nvedit.c17
-rw-r--r--cmd/pxe.c17
2 files changed, 17 insertions, 17 deletions
diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index b5da3759133..3420e0b985b 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -682,6 +682,23 @@ char *env_get(const char *name)
}
/*
+ * 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.
+ */
+char *from_env(const char *envvar)
+{
+ char *ret;
+
+ ret = env_get(envvar);
+
+ if (!ret)
+ printf("missing environment variable: %s\n", envvar);
+
+ return ret;
+}
+
+/*
* Look up variable from environment for restricted C runtime env.
*/
int env_get_f(const char *name, char *buf, unsigned len)
diff --git a/cmd/pxe.c b/cmd/pxe.c
index 768e50aba61..ed553953b37 100644
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -37,23 +37,6 @@ const char *pxe_default_paths[] = {
static bool is_pxe;
-/*
- * 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.
- */
-static char *from_env(const char *envvar)
-{
- char *ret;
-
- ret = env_get(envvar);
-
- if (!ret)
- printf("missing environment variable: %s\n", envvar);
-
- return ret;
-}
-
#ifdef CONFIG_CMD_NET
/*
* Convert an ethaddr from the environment to the format used by pxelinux