summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-10-07 08:00:25 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-10-07 08:00:25 +0200
commit33c56e21eb3bf841c79d9c8a40dedc8b16b774f2 (patch)
treefc0e871d5fc9020e0c4bb01ef0a5cf4ece6060a1 /common
parentd32008b2797a7c1bb13ec0cb3273de2dfcc97d02 (diff)
parentce8f489122e8390360e87c84888aacfc87743a83 (diff)
downloadbarebox-33c56e21eb3bf841c79d9c8a40dedc8b16b774f2.tar.gz
barebox-33c56e21eb3bf841c79d9c8a40dedc8b16b774f2.tar.xz
Merge branch 'for-next/misc'
Conflicts: commands/Makefile
Diffstat (limited to 'common')
-rw-r--r--common/globalvar.c3
-rw-r--r--common/hush.c6
-rw-r--r--common/parser.c9
3 files changed, 18 insertions, 0 deletions
diff --git a/common/globalvar.c b/common/globalvar.c
index 6ef4a6a680..41ce06e468 100644
--- a/common/globalvar.c
+++ b/common/globalvar.c
@@ -72,6 +72,9 @@ int globalvar_add_simple(const char *name, const char *value)
if (ret && ret != -EEXIST)
return ret;
+ if (!value)
+ return 0;
+
return dev_set_param(&global_device, name, value);
}
diff --git a/common/hush.c b/common/hush.c
index a3235ba19f..bf1d9e6fd7 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -123,6 +123,7 @@
#include <linux/list.h>
#include <binfmt.h>
#include <init.h>
+#include <shell.h>
/*cmd_boot.c*/
extern int do_bootd(int flag, int argc, char *argv[]); /* do_bootd */
@@ -226,6 +227,11 @@ static char console_buffer[CONFIG_CBSIZE]; /* console I/O buffer */
* the first three support $?, $#, and $1 */
static unsigned int last_return_code;
+int shell_get_last_return_code(void)
+{
+ return last_return_code;
+}
+
/* "globals" within this file */
static uchar *ifs;
static char map[256];
diff --git a/common/parser.c b/common/parser.c
index 4d993dfd35..d390fb6afe 100644
--- a/common/parser.c
+++ b/common/parser.c
@@ -1,6 +1,15 @@
#include <common.h>
#include <command.h>
#include <environment.h>
+#include <shell.h>
+
+/*
+ * not yet supported
+ */
+int shell_get_last_return_code(void)
+{
+ return 0;
+}
static int parse_line (char *line, char *argv[])
{