summaryrefslogtreecommitdiff
path: root/include/env_callback.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/env_callback.h')
-rw-r--r--include/env_callback.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/include/env_callback.h b/include/env_callback.h
index ab4e115fb0..ab5d42dd81 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -31,14 +31,41 @@
#define SPLASHIMAGE_CALLBACK
#endif
+#ifdef CONFIG_REGEX
+#define ENV_DOT_ESCAPE "\\"
+#else
+#define ENV_DOT_ESCAPE
+#endif
+
+#ifdef CONFIG_CMD_DNS
+#define DNS_CALLBACK "dnsip:dnsip,"
+#else
+#define DNS_CALLBACK
+#endif
+
+#ifdef CONFIG_NET
+#define NET_CALLBACKS \
+ "bootfile:bootfile," \
+ "ipaddr:ipaddr," \
+ "gatewayip:gatewayip," \
+ "netmask:netmask," \
+ "serverip:serverip," \
+ "nvlan:nvlan," \
+ "vlan:vlan," \
+ DNS_CALLBACK \
+ "eth\\d?addr:ethaddr,"
+#else
+#define NET_CALLBACKS
+#endif
+
/*
* This list of callback bindings is static, but may be overridden by defining
* a new association in the ".callbacks" environment variable.
*/
-#define ENV_CALLBACK_LIST_STATIC ENV_CALLBACK_VAR ":callbacks," \
- ENV_FLAGS_VAR ":flags," \
+#define ENV_CALLBACK_LIST_STATIC ENV_DOT_ESCAPE ENV_CALLBACK_VAR ":callbacks," \
+ ENV_DOT_ESCAPE ENV_FLAGS_VAR ":flags," \
"baudrate:baudrate," \
- "bootfile:bootfile," \
+ NET_CALLBACKS \
"loadaddr:loadaddr," \
SILENT_CALLBACK \
SPLASHIMAGE_CALLBACK \