summaryrefslogtreecommitdiff
path: root/include/env_callback.h
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-05-20 14:27:20 -0500
committerTom Rini <trini@konsulko.com>2015-05-21 09:13:19 -0400
commitbdf1fe4e68b0d240f0ee666ea9d92d3f42f1a23f (patch)
tree1e5a0ede7767bda2afdf816ac73d67b49e677e02 /include/env_callback.h
parentcca98fd6aa111f622be09ffdb5c59684c5e160af (diff)
env: Add regex support to env_attrs
Allow the features that use env_attrs to specify regexs for the name Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/env_callback.h')
-rw-r--r--include/env_callback.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/env_callback.h b/include/env_callback.h
index ab4e115fb06..3de1093ff17 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -31,12 +31,18 @@
#define SPLASHIMAGE_CALLBACK
#endif
+#ifdef CONFIG_REGEX
+#define ENV_DOT_ESCAPE "\\"
+#else
+#define ENV_DOT_ESCAPE
+#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," \
"loadaddr:loadaddr," \