summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-27 06:59:55 -0400
committerTom Rini <trini@konsulko.com>2022-07-27 06:59:55 -0400
commit7277c4bddceb6b8a59ba47b8b111ab070d86919f (patch)
tree0bd1db6551763d178d25e80a350be458150c9e8e /common
parent81e712a91729950fbd8fb38a6f729cb9847b0adb (diff)
parentdce4322c0e1940e11ef9ff086890b8c474707317 (diff)
Merge tag 'dm-pull-26jul22' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm.git
minor dm- and fdt-related fixes start of test for fdt command
Diffstat (limited to 'common')
-rw-r--r--common/cli.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/common/cli.c b/common/cli.c
index a7e3d84b68..a47d6a3f2b 100644
--- a/common/cli.c
+++ b/common/cli.c
@@ -126,6 +126,21 @@ int run_command_list(const char *cmd, int len, int flag)
return rcode;
}
+int run_commandf(const char *fmt, ...)
+{
+ va_list args;
+ char cmd[128];
+ int i, ret;
+
+ va_start(args, fmt);
+ i = vsnprintf(cmd, sizeof(cmd), fmt, args);
+ va_end(args);
+
+ ret = run_command(cmd, 0);
+
+ return ret;
+}
+
/****************************************************************************/
#if defined(CONFIG_CMD_RUN)