#include <cli.h>
#include <command.h>
#include <console.h>
+#include <env.h>
#include <environment.h>
#include <search.h>
#include <errno.h>
/*
* This variable is incremented on each do_env_set(), so it can
- * be used via get_env_id() as an indication, if the environment
+ * be used via env_get_id() as an indication, if the environment
* has changed or not. So it is possible to reread an environment
* variable only if the environment was changed ... done so for
* example in NetInitLoop()
*/
static int env_id = 1;
-int get_env_id(void)
+int env_get_id(void)
{
return env_id;
}
#include <common.h>
#include <command.h>
+#include <env.h>
#include <stdio_dev.h>
#include <net.h>
static struct in_addr netmask;
static struct in_addr our_ip;
static int env_changed_id;
- int env_id = get_env_id();
+ int env_id = env_get_id();
/* update only when the environment has changed */
if (env_changed_id != env_id) {
{
const char *p;
static int env_changed_id;
- int env_id = get_env_id();
+ int env_id = env_get_id();
/* update only when the environment has changed */
if (env_changed_id != env_id) {
return env_set_hex(varname, (ulong)addr);
}
-int get_env_id (void);
-
void pci_init_board(void);
/* common/exports.c */
#include <stdbool.h>
+/**
+ * env_get_id() - Gets a sequence number for the environment
+ *
+ * This value increments every time the environment changes, so can be used an
+ * an indication of this
+ *
+ * @return environment ID
+ */
+int env_get_id(void);
+
/**
* env_complete() - return an auto-complete for environment variables
*
#include <common.h>
#include <dm.h>
+#include <env.h>
#include <environment.h>
#include <miiphy.h>
#include <net.h>
static int env_changed_id;
int env_id;
- env_id = get_env_id();
+ env_id = env_get_id();
if ((act == NULL) || (env_changed_id != env_id)) {
act = env_get("ethact");
env_changed_id = env_id;