Add simple 'true' command, useful for while loops
authorPiotr Dymacz <pepe2k@gmail.com>
Sun, 6 Aug 2017 20:59:56 +0000 (22:59 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Sun, 6 Aug 2017 20:59:56 +0000 (22:59 +0200)
u-boot/common/hush.c

index 0b0e7d074035f5dbc169a66401c882321965345e..5fcc49f22d169234d65ea7f8c8b597dbf114932d 100644 (file)
@@ -1564,5 +1564,12 @@ static char * make_string(char ** inp) {
        return str;
 }
 
+int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       return 0;
+}
+
+U_BOOT_CMD(true, 1, 1, do_true, "return true\n", NULL);
+
 #endif /* CFG_HUSH_PARSER */
 /****************************************************************************/