summaryrefslogtreecommitdiff
path: root/sysutils/u-boot-rpi3/files/patch-common_cmd__test.c
diff options
context:
space:
mode:
authorDiane Bruce <db@FreeBSD.org>2016-10-18 14:23:50 +0000
committerDiane Bruce <db@FreeBSD.org>2016-10-18 14:23:50 +0000
commit38c39dd8da26df3cd84cc043d22e8e2d73d6fbd8 (patch)
tree028a336343266b8728e83f43e75f0d2c2799b4da /sysutils/u-boot-rpi3/files/patch-common_cmd__test.c
parentnet/quagga: Update 1.0.20160315 -> 1.0.20161017 (diff)
Initial u-boot port for the Raspberry Pi 3
Diffstat (limited to 'sysutils/u-boot-rpi3/files/patch-common_cmd__test.c')
-rw-r--r--sysutils/u-boot-rpi3/files/patch-common_cmd__test.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sysutils/u-boot-rpi3/files/patch-common_cmd__test.c b/sysutils/u-boot-rpi3/files/patch-common_cmd__test.c
new file mode 100644
index 000000000000..c72587b117c9
--- /dev/null
+++ b/sysutils/u-boot-rpi3/files/patch-common_cmd__test.c
@@ -0,0 +1,19 @@
+--- common/cmd_test.c.orig 2015-04-13 14:53:03 UTC
++++ common/cmd_test.c
+@@ -65,9 +65,14 @@ static int do_test(cmd_tbl_t *cmdtp, int
+ char * const *ap;
+ int i, op, left, adv, expr, last_expr, last_unop, last_binop;
+
+- /* args? */
+- if (argc < 3)
++ /*
++ * If no args, that's bogus, return false.
++ * If op is -z and no other args, answer is Yes, string is empty.
++ */
++ if (argc < 2)
+ return 1;
++ else if (argc == 2)
++ return !(strcmp(argv[1], "-z") == 0);
+
+ #ifdef DEBUG
+ {