aboutsummaryrefslogtreecommitdiff
path: root/common/cli_hush_modern.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cli_hush_modern.c')
-rw-r--r--common/cli_hush_modern.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/cli_hush_modern.c b/common/cli_hush_modern.c
index 15bb1f0d92..6360747f21 100644
--- a/common/cli_hush_modern.c
+++ b/common/cli_hush_modern.c
@@ -33,6 +33,7 @@
*/
#define ENABLE_HUSH_INTERACTIVE 1
#define ENABLE_FEATURE_EDITING 1
+#define ENABLE_HUSH_IF 1
/* No MMU in U-Boot */
#define BB_MMU 0
#define USE_FOR_NOMMU(...) __VA_ARGS__
@@ -124,6 +125,11 @@ static void bb_error_msg(const char *s, ...)
va_end(p);
}
+static void bb_simple_error_msg(const char *s)
+{
+ bb_error_msg("%s", s);
+}
+
static void *xmalloc(size_t size)
{
void *p = NULL;
@@ -147,6 +153,11 @@ static void *xrealloc(void *ptr, size_t size)
return p;
}
+static void *xmemdup(const void *s, int n)
+{
+ return memcpy(xmalloc(n), s, n);
+}
+
#define xstrdup strdup
#define xstrndup strndup