From: Weijie Gao Date: Mon, 8 Sep 2025 08:34:07 +0000 (+0800) Subject: misc: fs_loader: allow using long script name in request_firmware_into_buf_via_script() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b1d3d83d68a713c492bfad991338d47069f337e;p=thirdparty%2Fu-boot.git misc: fs_loader: allow using long script name in request_firmware_into_buf_via_script() Use cmd_process() to remove the length limit of script name used for run_command(). Signed-off-by: Weijie Gao --- diff --git a/drivers/misc/fs_loader.c b/drivers/misc/fs_loader.c index 87acd385e23..6a6796c1931 100644 --- a/drivers/misc/fs_loader.c +++ b/drivers/misc/fs_loader.c @@ -232,18 +232,15 @@ int request_firmware_into_buf_via_script(void **buf, size_t max_size, const char *script_name, size_t *retsize) { + char *args[2] = { (char *)"run", (char *)script_name }; + int ret, repeatable; ulong addr, size; - int ret; - char cmd[32]; if (!buf || !script_name || !max_size) return -EINVAL; - /* Create command to run the firmware loading script */ - snprintf(cmd, sizeof(cmd), "run %s", script_name); - /* Run the firmware loading script */ - ret = run_command_list(cmd, -1, 0); + ret = cmd_process(0, 2, args, &repeatable, NULL); if (ret) { log_err("Firmware loading script '%s' not defined or failed.\n", script_name);